07
Jun
09

c# selecting a directory in an “open file” dialog



If you need to select a directory in an “open file” dialog, you can use the following code :


FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
string selected = dialog.SelectedPath;

The window will look like this :
dialog


5 Responses to “c# selecting a directory in an “open file” dialog”


  1. June 15, 2010 at 12:44

    thanks for sharing,,

  2. June 22, 2011 at 22:11

    not working in java

  3. January 30, 2012 at 16:56

    Lovely Lovely site ma. tHANKS For ur WordPress


Leave a comment


Blog Stats

  • 281,737 hits