articles

Home / DeveloperSection / Articles / FolderBrowserDialog Control in VB.Net

FolderBrowserDialog Control in VB.Net

FolderBrowserDialog Control in VB.Net

Pushpendra Singh 25162 11-Dec-2010

Where the FolderBrowserDialog control is used to browse and select a browser.

Now the question comes
How to use FolderBrowserDialog?
Drag and drop FolderBrowserDialog control from the toolbox on the window Form.
Drag and drop button and textbox, the button for showing browser dialog and textbox to show the selected path.

 

FolderBrowserDialog Control in VB.Net

FolderBrowserDialog Control in VB.Net

Drag and drop button and textbox, a 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 the Browse button then FolderBrowserDialog will open.

FolderBrowserDialog Control in VB.Net

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

FolderBrowserDialog Control in VB.Net

Next Article :- MaskedTextBox Control in C#.Net


Updated 12-Mar-2020

Leave Comment

Comments

Liked By