enhanced FolderBrowserDialog

G

Guest

How do I get a folder browser dialog that looks and operates like the one I get in VS.NET when I add a new project and click on "Browse..." to choose a folder location for my folder?

The folder browser dialog that is created with the following line is more simplistic that what I am looking for...

private FolderBrowserDialog folderBrowserDialog1;

I want one that looks more like the OpenFileDialog, while allowing me to choose a folder.

Thanks.
 
N

Nicholas Paldino [.NET/C# MVP]

Noel,

You might be able to do this yourself with a OpenFileDialog. Basically,
hook up to the FileOk event, and check to see if the current file in the
dialog box is a directory or a file. If it is a directory, then allow it
(don't cancel the event), if it is, then allow it.

You might have to derive from OpenFileDialog and override the HookProc
method to handle certain messages that are sent to the hook procedure in
order to allow the selection of a directory.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Noel Scheaffer said:
How do I get a folder browser dialog that looks and operates like the one
I get in VS.NET when I add a new project and click on "Browse..." to choose
a folder location for my folder?
The folder browser dialog that is created with the following line is more
simplistic that what I am looking for...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top