|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Saving a File to the DesktopI want to be able to save a file to the Desktop. I realise the Desktop
path varies according to the version of Windows being used. Can some-one help me with the following three issues: 1. Is the best option to use 'Environment.OSVersion.Version.Major' to determine which version of Windows? 2. What values do each of the Windows versions have for point 1 above? 3. I know the path for XP (C:\Documents and Settings\" & strUserName & "\Desktop\) and for Windows 98 (C:\Windows\Desktop\), but can anyone help me what the paths for the other Windows versions would be? With thanks "Devlei" <dev***@eastcape.net> schrieb: 'Environment.GetFolderPath(Environment.SpecialFolder.Desktop)' should return >I want to be able to save a file to the Desktop. I realise the Desktop > path varies according to the version of Windows being used. >[...] > 3. I know the path for XP (C:\Documents and Settings\" & strUserName & > "\Desktop\) and for Windows 98 (C:\Windows\Desktop\), but can anyone > help me what the paths for the other Windows versions would be? the correct path on all versions of Windows supported by the .NET Framework. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> "Devlei" <dev***@eastcape.net> kirjoitti viestissä:1144847469.752733.28***@j33g2000cwa.googlegroups.com...>I want to be able to save a file to the Desktop. Just useDim deskDir As String = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) That should give you desktop folder. |
|||||||||||||||||||||||