CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Thursday, September 14, 2006

.NET code for folderBrowser

   // set the root folder to "my document" folder
   this.folderBrowserDialog.RootFolder=System.Environment.SpecialFolder.Personal;
   // whether we allow user to create new folder
   this.folderBrowserDialog.ShowNewFolderButton=false;

   DialogResult dr=this.folderBrowserDialog.ShowDialog(this);

   if (dr==DialogResult.OK)
   {
    this.textBox1.Text=this.folderBrowserDialog.SelectedPath;
   }

Post a Comment