Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Browse Folder Dialog
Author:
jjdickow
Website:
http://vb-board.com
Submitted:
8/19/2010
Version:
VB 2008
Compatibility:
VB 2008, VB 2010
Category:
String Manipulation
Views:
25132
Learn to add a browse folder dialog to your application.
Declarations:
'none
Code:
Originally on my site: [URL="http://vb-board.com"]Browse Folder Dialog[/URL] Alright guys so I am going to show you how to create a browsefolderdialog. 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. This is how it will work when you are done: [youtube]http://www.youtube.com/watch?v=ci9zC2HN8lA[/youtube]
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement