Home > DeveloperSection > Beginner > FolderBrowserDialog Control in VB.Net

FolderBrowserDialog Control in VB.Net


VB.Net VB.Net 
Ratings:
0 Comment(s)
 12832  View(s)
Rate this:

FolderBrowserDialog Control in VB.Net

A FolderBrowserDialog control is used to browse and select a folder.

How to use FolderBrowserDialog

Drag and drop FolderBrowserDialog control from toolbox on the window Form.

 

FolderBrowserDialog Control in VB.Net

FolderBrowserDialog Control in VB.Net

Drag and drop button and textbox, button for showing browser dialog and textbox to show the selected path.

Code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

 

        'FolderBrowserDialog will show

        FolderBrowserDialog1.ShowDialog()

        TextBox1.Text = FolderBrowserDialog1.SelectedPath

 

End Sub

Run the project

FolderBrowserDialog Control in VB.Net

When you click Browse button then FolderBrowserDialog will open.

FolderBrowserDialog Control in VB.Net

When you select file and click ok then path of selected file will show in the TextBox

FolderBrowserDialog Control in VB.Net


Don't want to miss updates? Please click the below button!

Follow MindStick