System.Windows.Forms 1.0.5000.0 2.0.0.0 System.Windows.Forms.CommonDialog System.ComponentModel.Designer("System.Windows.Forms.Design.FolderBrowserDialogDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.ComponentModel.DefaultProperty("SelectedPath") System.ComponentModel.DefaultEvent("HelpRequest") This class provides a way to prompt the user to browse, create, and eventually select a folder. Use this class when you only want to allow the user to select folders, not files. Browsing of the folders is done through a tree control. Only folders from the file system can be selected; virtual folders cannot. Typically, after creating a new , you set the to the location from which to start browsing. Optionally, you can set the to an absolute path of a subfolder of that will initially be selected. You can also optionally set the property to provide additional instructions to the user. Finally, call the method to display the dialog box to the user. When the dialog box is closed and the dialog box result from is , the will be a string containing the path to the selected folder. You can use the property to control if the user is able to create new folders with the New Folder button. is a modal dialog box; therefore, when shown, it blocks the rest of the application until the user has chosen a folder. When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box. The program must hide or close the dialog box (usually in response to some user action) before input to the calling program can occur. Prompts the user to select a folder. This class cannot be inherited. Constructor The default constructor initializes properties to their default values. When a new is created, the property is set to , the property is set to an empty string (""), the property is set to an empty string, and the property is set to true. Typically, after creating a new , you set the to the location from which to start browsing. Optionally, you can set the to the path of a subfolder of that will initially be selected. You can also optionally set the property to provide additional instructions to the user. Finally, call the method to display the dialog box to the user. When the dialog box is closed and the dialog result from is , the will be a string containing the path to the selected folder. is a modal dialog box; therefore, when shown, it blocks the rest of the application until the user has chosen a folder. When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box. The program must hide or close the dialog box (usually in response to some user action) before input to the calling program can occur. Initializes a new instance of the class. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.Localizable(true) System.ComponentModel.DefaultValue("") System.ComponentModel.Browsable(true) System.String To be added. The property can be used to specify additional information to the user, like instructions. Gets or sets the descriptive text displayed above the tree view control in the dialog box. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler To be added. Occurs when the user clicks the Help button on the dialog box. 1.0.5000.0 2.0.0.0 Method System.Void Resets the , , and properties to their default values. For a list of default values, see the constructor. Resets properties to their default values. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.SpecialFolderEnumConverter)) System.ComponentModel.Localizable(false) System.ComponentModel.DefaultValue(System.Environment+SpecialFolder.Desktop) System.ComponentModel.Browsable(true) System.Environment+SpecialFolder To be added. Only the specified folder and any subfolders that are beneath it will appear in the dialog box and be selectable. The property, along with , determines what the selected folder will be when the dialog box is displayed, as long as is an absolute path that is a subfolder of (or more accurately, points to a subfolder of the shell namespace represented by ). Gets or sets the root folder where the browsing starts from. 1.0.5000.0 2.0.0.0 Method System.Boolean To be added. This method is called by the method. Displays the dialog box. A value that represents the window handle of the owner window for the dialog box. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.Localizable(true) System.ComponentModel.Editor("System.Windows.Forms.Design.SelectedPathEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor)) System.ComponentModel.DefaultValue("") System.ComponentModel.Browsable(true) System.String To be added. If the property is set before showing the dialog box, the folder with this path will be the selected folder, as long as is set to an absolute path that is a subfolder of (or more accurately, points to a subfolder of the shell namespace represented by ). If the returns , meaning the user clicked the OK button, the property will return a string containing the path to the selected folder. If returns , meaning the user canceled out of the dialog box, this property will have the same value that it had prior to displaying the dialog box. If the user selects a folder that does not have a physical path (for example, My Computer), the OK button on the dialog box will be disabled. Gets or sets the path selected by the user. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.Localizable(false) System.ComponentModel.DefaultValue(true) System.ComponentModel.Browsable(true) System.Boolean To be added. When is true, the New Folder button is visible, giving the user a chance to create a folder. When the user clicks the New Folder button, a new folder is created and the user is prompted to specify the folder name. The selected node in the tree becomes the parent of the new folder. The actual caption of the New Folder button can vary depending upon the operating system Setting to false does not work on Windows 2000. Gets or sets a value indicating whether the New Folder button appears in the folder browser dialog box. 1.0.5000.0 2.0.0.0