Click to See Complete Forum and Search --> : Select specific Rootpath in folderBrowserDialog1


raulbolanos
July 1st, 2009, 10:13 AM
Hey guys,

How I can open a specific Rootpath in folderBrowserDialog1 when it only accept SpecialFolder Enum.

For example if I want to my Rootpath start from "C:\ProgramA\lib\v1.5\examples\".

What can I do in this case?

Thank you.

Shuja Ali
July 1st, 2009, 03:27 PM
Instead of using RootFolder, you will need to set the SelectedPath property of the folderbrowserdialog. As you have already seen Rootfolder only accepts the special folder enum, however SelectedPath is a property that has a setter as well, so you can use that.

ssware
July 3rd, 2009, 03:53 AM
As an alternative you can look at a 3rd party folder browser control like our FolderView control which allows you to specify any folder as the root folder and offers much more customization and features than the default FolderBrowserDialog.
For More Information, visit,
http://www.ssware.com/fldrview.htm