954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

FolderBrowserDialog to open and find a folder

0
By Antony Joseph A V on Oct 8th, 2010 11:48 am

Hello All,

Open Destination Folder programmatically using Folder Browser Dialog.
CodeSnippet attached below.

Usually all know about the dialogs available in .net like savefiledialog, openfiledialog, printfiledialog etc; but many of us dont know about folderBrowserdilaog.

Me too was unaware of it, and searched a lot to get code to open just folder. but It was disappointment.

Finally I got a hint of FolderBrowserDialog.

And I used the code mentioned below.
It was all I need.

[CODE]Dim folderBrowserDialog As New FolderBrowserDialog()
            folderBrowserDialog.Description = "Get Folder"
            folderBrowserDialog.RootFolder = Environment.SpecialFolder.MyComputer
            folderBrowserDialog.ShowNewFolderButton = True

            If folderBrowserDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
                   '--------------your code-------------------                
            End If[/CODE]

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You