I've found this code and it works in XP: [code] When I run the same code in Vista, I get an exception at the line "System. Environment.Get FolderPath(":See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. [code] I assume this has to do with the Vista UAC. Is there a better way to retrieve the "My Documents" path of either XP or Vista with one piece of code?
I've been fighting for weeks now to make a simple music playback program. It would function much like Windows Media Player without the visualisations and playlists. I'm writing this on a Win7 box, but it needs to work on XP and newer.
I say fighting because I'm severely annoyed at how MS has worked some items and it's taken many days to go through everything only to find that it doesn't work.
I started by using WMP in VB Express 2010 and having it play my music. Simple, but not portable. I copied my .exe to a WinXP machine and it blew up. I copied it to a different Win7 machine and it doesn't run (I can double-slick all day, nothing happens, no log entries, nothing....)
Then I find that there is an issue with the GUID of media player on different computers, and it'll most likely fail to run when you try to use it on other machines than the one the program was built on.
So I gave up on that.
I then figured I'd use DirectX. It's on XP and newer already, and is supposed to be backwards compatibile so if I build my app on Win7 it should still run on XP and such. I did that, and it works fine on the machine I built it with (again). My shuffle works,loop/repeat works, got my own version of a playlist and it all works. I copy that to another Win7 box and it doesn't run at all. It's setup as .NET 3 so I can be sure of compatibilty with WinXP.
For grins, I gutted all the code in my VB app involving calls to Directx and built that. It runs fine on other computers, including my XP test box. So I know the problem revolves around DirectX somehow.[code]...
i compile my form with the below code when i run it on vista work fine without any problem but when i try to run in on XP cant run... that happened with any XP machine.[code]when i run my exe to other Vista machines work fine... but on xp NO.
My program runs under a limited account, and uses impersonation to access admin codeI also have a program in the same folder, that my program runs sometimes when it exitsBoth exe files are in the same folder in the "Program Files" folderIf I try to run the other file, I get a not found error.If I Raise the first program to admin (even though it should already have admin rights due to impersonate) it can run the second file.1. I don't want to raise to admin.2. I'm using the full path and file name to the file.3. That do i need so that dot net can find the file so that it runs.
I've been asked to get the page counts for documents stored as tif files. What I have now is looping through our third party software to open them and then get the page count. I can't stop the image from flashing and it is very slow. Does anyone know of a way to loop through them quickly and can the page counts (one image can have many documents)?
My app is a tray icon which scans the Outlook Inbox periodically. It seems, from testing in my VMWare WinXP machine, that the app stops Windows from shutting down. I press StartShutdown but nothing happens. I have to exit the app first then StartShutdown will shutdown the PC.
I am wondering if I can use VB.NET(I am using visual studio 2010 express) to get and set a environment variable.
I want to add path of my application on system environment. I want to preserve what is already there and then I wan to add my string. This can be done by getting value of PATH and then append my string then re writing it.
I have 2 questions here:
How to get/set system variable in vb.net 2010? Will it be on the fly, I mean will it be immediatly avaialble in dos prompt or there will be delay?
As just for experiment i opened a command prompt then updated the PATH variable manually and it was not updated. I am wondering it I do it through programe it will be same.
I am trying to make my controls look as cool as xp theme enabled controls like gradient fill background in container controls and colour thames support etc
I found it to enable visual styles but didn't give me visual thames to apply. So in order to apply thames or colour schemes what should i do?What other commands should i use with combination with it? as I have seen my application giving ugly look even applying that command and other program showing nice loook in my win2003 server
I'm currently setting up TortoiseSVN 1.6.6 on my WinXP system here at work and since I use VS2005 and VS2008 regularly here I'm considering installing AnkhSVN 2.1.7444 to make things easier as at my other job I use VSS (Visual Source Safe) which integrates into VS2003, VS2005 and VS2008 and works very nicely.So for those of you who have used AnkhSVN 2.1.7444 and VS2005/2008 what's your opinion?
Within a VB.net program I used IO.File.GetCreationTime to read the file system's creation time of a file. I was irritated, because the returned value didn't match with the time displayed in the explorer. On another machine the time was displayed correctly.
I am been working on an a small app that has a Forms.Webbrowser control that navigates to a Adobe Flash program. I have developed the app on Vista 32bit platform and have had no problems. I have sent the app to a couple of people to test out and one is using Vista 64bit and is running into a problem. I know the webbrowser control just uses the underlying base framework of IE. The problem on the 64 bit machine is when the site is navigated to it says that it needs to have Flash installed. When the user goes to Adobe's site it says they need to use a 32bit browser.
As stated on Adobe site here:[URL] the Flash player need to be in a 32 bit browser. What options do I have to be able fix this problem? Is there another control that I can use that would be the same in a 32bit platform and 64bit platform? Besides navigating to the Flash program, the browser also goes to standard web pages.
I have a sub that I just discovered does not work for my windows 7 users but works fine for my windows XP users. This is basically a sub for a ping monitor to ping devices on a timer. What happens is that when the windows 7 user tries to ping, it always reports "down" on a windows 7 whether actually up or down. But, windows xp will report correctly with "up". 3 different windows 7 boxes, users say it worked before. Can't quite debug correctly as i'm on xp myself and it works just fine. Also, I haven't changed anything in the code in quite awhile and this is a recent bug that just started.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim itm As Object Sec = Sec - 1 If ListView1.Items.Count = 0 Then Me.Close() If Sec <= 0 Then [Code] .....
I've adapted the code from this link to use the WinXP on-screen keyboard (osk) for a touch-screen application written in VB.NET v3.5. The osk fills the bottom half of screen etc. and behaves fine except for one little quirk. If the user clicks or taps anywhere on the 'background' area behind/between the virtual keys (within the main osk window), the color of the area changes to that of the keys when any further key subsequently gets focus. The outline of all keys is then lost because they are visually merged into the osk window background. The osk must then be terminated and re-launched to remove the confusing appearance.
This behaviour only occurs when the osk window is set to the child style (i.e. when the menu is hidden), using the SetWindowLong P/Invoke function - e.g.
It's as if the entire area behind the keys is being treated as another key when tapped/clicked, whereupon its color is 'restored' after losing focus.Is there any way to intercept and somehow override the focus event of this osk background area?
ive decided to try out win7 since its finally a bit more debugged, ive backed up very carefully all my projects, however there semms to be a problem with the one i was working on, this first chance exception error has been avoided and not even mentioned in winxp however in win7 it not only mentions it but makes the application crash, This is what its nagging me about, i dont get it isnt windows7 the same when it comes to mydocs? Was not possible to locate part of the path: C:UsersEugenDocumentsIOrganizeSettingsCalendarConfig
Sorry i had to translate it, its in portuguese language, yeah i know... if i could i wouldve changed it but win7pro doesnt gimme that option, anyways back to the topic:
A first chance exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll
This is the code i came up with:
If My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/IOrganizeSettings" & "/CalendarConfig/") = False Then My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/IOrganizeSettings" & "/CalendarConfig/") End If
I have a slight problem. I have created an application where I am using linklabels to refer to a website, this works with no problem at all, however the problem that I do have is I cant work out the command to refer to a file or document.The code to refer to a file on my PC is simple enough and works fine:
Is it possible to store a document in a database and then be able to load it into VB and populate specific areas with data from textBoxes? like address or name details..I suppose a bit like a mail merge ?
In my application users can highlight a collection of documents and click on a button to print preview. This causes the first document to be displayed and from there you can print. The problem is that if I choose 10 documents they have to go through this process 10 times. Is there any way I can load up all the documents into the PrintPreviewDialog at once?
I am creating a project that makes use of a folder, at the moment that folder is located in My documents, how would I change this to be default as in the bin debug folder. Dim QCRoot As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments + "Database Files"
when i click print button one word document will be displayed and name as Bill Of Lading1 but i didn't print, again i click print button i have to display one more word document name must be Bill Of Lading2 and so on if the user clicks on the button.. How to i loop for displaying Bill Of lading1, Bill of Lading2 and so on....
Private Sub ToolPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolPrint.Click Try
print pdf documents from a vb 2010 app. I have tried 2 techniques that work, but both have some minor issues that I'd like to address. The 1st technique uses command line arguments as follows:
Dim starterStr As String = "/h /t " & Chr(34) & pdfFileName & Chr(34) & " " & Chr(34) & printerName & Chr(34) Dim starter As New ProcessStartInfo("AcroRd32.exe", starterStr) Dim print As New Process() With print
The 2nd technique is more aesthetically pleasing to me, but has the same annoying problem of leaving the Acrobat process running after execution. It also doesn't allow me to set the output printer destination (the above code sends the output to the default printer).
1. how to close the Acrobat process
2. how to set an output printer destination using StartInfo arguments
I have saved documents into my SQL Server 2005 database and they have been converted to bytes. My web page is made with VB.NET in Visual Studio 2008 with ASP.NET. The following is exactly what I need to achieve;
1. Allow user select document with a button
2. Select the document from the SQL Server table
3. Allow the user to download this document.
The error I am getting is that Category is set as Byte and it can't be passed through GetDocument because filePath is a String. I think that I am pulling the file path from the database wrong
[Dim Category As Byte() = NothingDim fs As FileStreamDim br As BinaryReaderDim document As Byte()Dim documentFilePath As String Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click myConnection = New SqlConnection("server=ORLA-PCSQLEXPRESS;database=Edpac;
Scenario: I have about 14000 word documents that need to be converted from "Microsoft Word 97 - 2003 Document" to "Microsoft Word Document". In other words upgraded to 2010 format (.docx).
Question: Is there an easy way to do this using API's or something? Note: I've only been able to find a microsoft program that converts the documents to .docx but they still open in compatability mode. It would be nice if they could just be converted to the new format. Same functionality you get when you open an old document and it gives you the option to convert it.[URL]..EDIT2: This is my current function for converting the documents
Also it opens word after about 2 or 3 conversions and starts flashing but keeps converting.EDIT3: Tweaked to code above a little bit and it runs cleaner. Takes 1min10sec to convert 8 files though. Considering I have 14000 I need to convert this method will take a reasonably long time.
EDIT4: Changed the code up again. Uses a threadpool now. Seems to run a bit faster. Still need to run on a better computer to convert all the documents. Or do them slowly by folder. Can anyone think of any other way to optimize this?
I want to write a program using vb.net tht compares the name of a document on my desktop to the name of the document on the server. If they're the same then I'd like to retrieve it and have it replace the file I already have.How can i do this? Does this mean that i have to write a web application cuz i hope not. I dont no anything about those. I am using that server for storage purposes only so i assumed that i didnt need a database for the name of the document.