none
FolderBrowserDialog.RootFolder "MyComputer" not functioning in Windows 10 RRS feed

  • Question

  • In my application, I use the following code to allow showing up only 'My Computer / This PC' in the dialog.

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

    On a Windows 8 machine, this works as 'This PC' showing up as the root directory. But, on a Windows 10, it opens with 'Desktop' as the root directory. Since my aim is not to show the 'Network' directory, I want the requirement in the Windows 10 as well.

    Should I be using an OS-specific Specific Folder (one for 8 and another for 10) or is there any other common SpecialFolder for both.



    Monday, December 19, 2016 9:10 AM

All replies

  • Hi Raghunath RR,

    >> But, on a Windows 10, it opens with 'Desktop' as the root directory.

    Here is my test screen capture. You can see root directory is Documents. And my machine is win10 64 bit

     

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 20, 2016 1:58 AM