C # FolderBrowserDialog RootFolder "Mycomputer" does not work on Windows 10

Using Visual Studio 2015, I am writing a Windows Form application in C #. I am using the following code:

FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.RootFolder = Environment.SpecialFolder.MyComputer;

On my development machine (Windows 8.1), this works as expected, FolderBrowserDialogappearing with "This Computer" as the root directory.

However, when I transfer the program to a Windows 10 machine (I tried both pro and the home version of Windows 10), it FolderBrowserDialogopens with "Desktop" in the root directory.

Is there any other SpecialFolderthat I should use for Windows 10?

+4
source share
1 answer

, MyComputer ThisPC Windows 8 10 , 8, 10. , :

string myComputerPath = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);

" ".

, MyComputer Guid:

FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
+2

All Articles