Hi friends ..
In this article am going to describe about to select a folder in vb.net
In vb.net tools folder browser dialog is available...
Just Drag and drop folder browser dialog from the tools in your form
Add one button and textbox in your form
Then enter the code in your button click event ...
Private Sub btntest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntest.Click
Dim myfolder As New FolderBrowserDialog
myfolder.Description = "Select The Folder "
myfolder.RootFolder = Environment.SpecialFolder.MyComputer
Dim result As DialogResult = myfolder.ShowDialog
If result = Windows.Forms.DialogResult.OK Then
t1.text=myfolder.SelectedPath
End if
End sub
Your selected folder is stored in the text box
i hope this one helpful to u...&..post your valuable commnets
0 comments:
Post a Comment