locked
Why the FolderBrowserDialog is being opened with no focus on the SelectedPath in Windows 7?

    Question

  • Hi,

    I using FolderBrowserDialog to open a directory selection dialog. I using the code:

    FolderBrowserDialog fbd = new FolderBrowserDialog();
    fbd.SelectedPath = "c:\...";
    fbd.ShowDialog();

    In XP it works perfectly well, but in Windows 7 the selected path is not being focused at all, and the focused directory is the root directory, so the user need to get to the directory which I opened by default.

    How can I overcome this bug?

    Thanks at Advanced
    Monday, October 25, 2010 3:53 PM

Answers

  • Hello again,

     

    For this, sadly no, i was searching for a workaround a while ago and came up emtpty, but if you are developing for windows 7 you can download the API core pack from here .

    And for the file browser part you can use one of these two options:


    Videos :
    Two minute videos demonstrating some features in the previous release:

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

     


    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    • Marked as answer by WiseTester Tuesday, October 26, 2010 8:34 PM
    Monday, October 25, 2010 9:29 PM

All replies

  • Hello,

     

    If you take a closer look you will see that the selected path is selected, but the folder tree is not scrolled to that folder,

    Please take a look at this example:

          using (var browseFolder = new FolderBrowserDialog())
          {
            browseFolder.SelectedPath = @"c:\";
            browseFolder.ShowDialog();
            MessageBox.Show(browseFolder.SelectedPath);
          }
    
    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga


    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Monday, October 25, 2010 9:10 PM
  • Hi,

    I know it's selected, but the focus is not on this selected folder, and the user need to scroll (a lot in my case) to see it (actually, he doesn't even know that it is selected, and he thinks that there's no default selected folder).

    So, how can I fix this? Patch? Workaround? Quick&Dirty? Anything which will work :)

    Thanks at Advanced!

    Monday, October 25, 2010 9:20 PM
  • Hello again,

     

    For this, sadly no, i was searching for a workaround a while ago and came up emtpty, but if you are developing for windows 7 you can download the API core pack from here .

    And for the file browser part you can use one of these two options:


    Videos :
    Two minute videos demonstrating some features in the previous release:

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

     


    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    • Marked as answer by WiseTester Tuesday, October 26, 2010 8:34 PM
    Monday, October 25, 2010 9:29 PM