Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Visual Basic: CommonDialog Control

CommonDialog Control (Open, Save As Dialogs)

See Also   Example   Properties   Methods   Events

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.

Show:
© 2015 Microsoft