Imports System
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Diagnostics
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Text.RegularExpressions
Imports System.Windows.Forms
' I think the only namespace needed for this example is System.Windows.Forms
' This namespace has to be addded to the project as a reference as well
Module Module1
Public MyFolder As String = Nothing
Sub Main()
BrowseForFolder()
Console.WriteLine(MyFolder)
Console.WriteLine("")
Console.WriteLine(">>>>>>>>>> Press Enter Key To Exit <<<<<<<<<<")
Console.ReadLine()
'do the other stuff, string MyFolder holds path selected with Browse For Folder Dialog
End Sub
Public Sub BrowseForFolder()
Dim folderDlg As New FolderBrowserDialog
folderDlg.ShowNewFolderButton = True
If (folderDlg.ShowDialog() = DialogResult.OK) Then
MyFolder = folderDlg.SelectedPath
Dim root As Environment.SpecialFolder = folderDlg.RootFolder
End If
'folderDlg.ShowDialog()
End Sub
End Module