5.18. Show the Common File Dialog Boxes
You need to show the standard Windows dialog boxes for opening and saving files and for selecting a folder.
Use the OpenFileDialog, SaveFileDialog, and FolderBrowserDialog classes in the System.Windows. Forms namespace. Call the ShowDialog method to display the dialog box, examine the return value to determine whether the user clicked Open or Cancel, and retrieve the selection from the FileName or SelectedPath property.
How It Works
The .NET Framework provides objects that wrap many of the standard Windows dialog boxes, including those used for saving and selecting files and directories. Each dialog box is appropriately formatted for the current operating system. The dialog box classes ...