Restrict Tree displayed by FolderBrowserDialog to arbitrary folder and its subfolders

  • Thread starter Thread starter Peter R. Fletcher
  • Start date Start date
P

Peter R. Fletcher

Is it possible to do this?

I have an application in which the user needs to specify/identify the
path to files which _must_ be in or "below" a previously specified
main working directory. The main working directory may be anywhere on
the system (or, indeed, on a mapped network drive). What I do now is
allow the user to browse anywhere, by setting RootFolder to My
Computer, and then check the returned path to make sure that it is in
or below the working directory. What I would really like is a value of
RootFolder which forced the dialog to display and the user to browse
only within the folder specified by SelectedPath. Clearly such a value
doesn't exist in the enumeration, but is there a workaround?

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Back
Top