Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data
Imports System.Configuration
Imports System.Resources
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.IO
Imports System.Drawing.Printing
Public Class MainClass
Shared Sub Main()
'Declare a FolderBrowserDialog object
Dim objFolderBrowserDialog As New FolderBrowserDialog
'Set the FolderBrowserDialog control properties
objFolderBrowserDialog.Description = "Select your favorite folder:"
objFolderBrowserDialog.RootFolder = Environment.SpecialFolder.Personal
objFolderBrowserDialog.ShowNewFolderButton = True
'Show the Browse For Folder dialog
If objFolderBrowserDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
'Display the selected folder
System.Console.WriteLine(objFolderBrowserDialog.SelectedPath)
End If
'Clean up
objFolderBrowserDialog.Dispose()
objFolderBrowserDialog = Nothing
End Sub
End Class
|