is there are way to specify a different rootfolder other than from the list proposed...???
Printable View
is there are way to specify a different rootfolder other than from the list proposed...???
isn't that in the properties of the folderbrowserdialog? If you set the initial directory to D:/, wouldn't it be the D:/, rather than whatever it is before?Quote:
Originally Posted by lplover2k
yes, but only special folders. You can see the different special folder options you can pick by looking at the intellisense enumeration when writing the code.
for example, this will make the root the windows system folder.
VB Code:
FolderBrowserDialog1.RootFolder = Environment.SpecialFolder.System
The SelectedPath property is type String and can thus be set to any path. The RootFolder property is type SpecialFolder so, as kleinma says, can only be set to one of the SpecialFolder values. SpecialFolder is an enumeration so you cannot just substitute any old path string for one of its values.