469,287 Members | 2,637 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,287 developers. It's quick & easy.

Choosing a customized RootFolder in a FolderBrowserDialog

Hi.

How can I initialize a FolderBrowserDialog choosing a particular RootFolder?
I saw that FolderBrowserDialog has a RootFolder member, but it accepts only
an Environment.SpecialFolder (but I don't want to choose a SpecialFolder for
my FolderBrowserDialog).

I hope I've been clear.

Thanks in advance
Feb 23 '06 #1
3 21889
Set the FolderBrowserDialog.SelectedPath value before showing the dialog.
Here's the first line from the Remarks section in the SDK for SelectPath:

"If the SelectedPath property is set before showing the dialog box, the
folder with this path will be the selected folder, as long as SelectedPath
is set to an absolute path that is a subfolder of RootFolder (or more
accurately, points to a subfolder of the shell namespace represented by
RootFolder)."
"antuantuan" <an****@TOGLIMIlibero.it> wrote in message
news:xA******************@twister2.libero.it...
Hi.

How can I initialize a FolderBrowserDialog choosing a particular
RootFolder?
I saw that FolderBrowserDialog has a RootFolder member, but it accepts
only
an Environment.SpecialFolder (but I don't want to choose a SpecialFolder
for
my FolderBrowserDialog).

I hope I've been clear.

Thanks in advance

Feb 23 '06 #2
Pete Davis wrote:
Set the FolderBrowserDialog.SelectedPath value before showing the
dialog. Here's the first line from the Remarks section in the SDK for
SelectPath:


I already did that and when the dialog is shown, the path I set is correctly
selected (highlighted) but it's not the root folder of the dialog (that is
what I want, in other words I want to see only the dir I chose and its
subdir's).
Feb 23 '06 #3
Oh, I see, then that won't work. You'll need to implement your own dialog.

Pete

"antuantuan" <an****@TOGLIMIlibero.it> wrote in message
news:Cj******************@twister2.libero.it...
Pete Davis wrote:
Set the FolderBrowserDialog.SelectedPath value before showing the
dialog. Here's the first line from the Remarks section in the SDK for
SelectPath:


I already did that and when the dialog is shown, the path I set is
correctly selected (highlighted) but it's not the root folder of the
dialog (that is what I want, in other words I want to see only the dir I
chose and its subdir's).

Feb 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by hhh12347 | last post: by
6 posts views Thread by John Krueger | last post: by
4 posts views Thread by Martin | last post: by
4 posts views Thread by hotmit | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.