TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jordan
NA
7
11k
Browse Folder Dialog
Aug 30 2010 1:06 PM
Alright guys so I am going to show you how to create a
browse folder dialog
. All this does it popup to the user and let them choose a folder.
For this you need:
1 Button
1 Textbox
Double click your button and add in the code:
[code]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim BrowseFolder As New FolderBrowserDialog
BrowseFolder.ShowDialog()
TextBox1.Text = BrowseFolder.SelectedPath
End Sub[/code]
[code]Dim BrowseFolder As New FolderBrowserDialog[/code]
This defines BrowseFolder as your FolderBrowserDialog
[code]BrowseFolder.ShowDialog()[/code]
This makes your FolderBrowserDialog pop-up to the user and lets them select their path
[code]TextBox1.Text = BrowseFolder.SelectedPath[/code]
This sets your textbox1.text to what ever folder is selected.
After that you can do whatever you want with your selected folder.
Reply
Answers (
0
)
Concatenation
Coding Practice