470,815 Members | 1,287 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Change File Browser to Folder Browser

Hi,

I currently have the following code that allows the user to select a
file name. However, I'll only need to select a folder. What changes do
I have to make?

private void Browse_Click(object sender,
System.EventArgs e)
{
axCommonDialog.FileName = txtInput.Text;
axCommonDialog.ShowOpen();
txtInput.Text = axCommonDialog.FileName;

}

The definition of axCommonDialog is
private AxMSComDlg.AxCommonDialog axCommonDialog;
Many thanks!

May 16 '06 #1
2 3519
Use the FolderBrowser control in WinForms.
http://msdn2.microsoft.com/en-us/lib...serdialog.aspx

Regards,
Tasos

May 16 '06 #2
Or if you're using VS 2003, you can download the FolderBrowser
component from the gotdotnet site :

<URL:http://download.microsoft.com/download/2/0/f/20f74f84-fc52-48d9-a203-84f2db42dd97/FolderBrowser.msi>

Other samples here :

<http://www.gotdotnet.com/team/vb/>

HTH,

Regards,

Cerebrus.

May 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by David Thielen | last post: by
5 posts views Thread by DrNoose | last post: by
8 posts views Thread by Mateusz Viste | last post: by
2 posts views Thread by Reggie | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.