Folder Browser Dialog: print Selected Folder : Dialog Folder Browser « GUI « VB.Net






Folder Browser Dialog: print Selected Folder

Folder Browser Dialog: print Selected Folder
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

           
       








Related examples in the same category

1.Folder Browser Dialog: set DescriptionFolder Browser Dialog: set Description
2.Folder Browser Dialog: set selected folderFolder Browser Dialog: set selected folder