Search code examples
winformswindows-forms-designervb6-migration

Does Windows Forms have a control for browsing drives, directories, files


Back in a day, Visual Studio 6 had:

  • DriveListBox
  • DirListBox
  • FileListBox

Does Windows Forms have something similar built-in, or is there a way to import it from VS6 (I came across some terms like VB6 compatibility or backward compatibility or something, but I don't know how to implement it)

If it's not possible, can you point me to some more modern solution, a component that would enable user to browse his file system?


Solution

  • I just found out about FolderBrowserDialog and the implementation:

        var d = new FolderBrowserDialog();
        d.ShowDialog();
    

    This will do nicely.