Visual Basic: CommonDialog Control
CommonDialog Control (Open, Save As Dialogs)
The Open and Save As dialogs are displayed by using the ShowOpen and ShowSave methods of the CommonDialog control.
Both dialog boxes allow the user to specify a drive, directory, filename extension, and a filename. The Save As dialog is identical to the Open dialog in appearance, except for the dialog's caption.
At run time, when the user chooses a file and closes the dialog box, the FileName property is used to get the selected filename.
You can set the Filter property so the dialog displays only certain types of files, such as text files. The Flags property can be used to change various elements on the dialog as well as prompt the user when certain actions may occur, such as overwriting a file.