Description

Runs a common dialog box.

Syntax

object.ShowDialog()

Return Value

One of the following values:

Value Meaning Description
0 None Nothing is returned from the dialog box. This means that the modal dialog continues running.
1 OK The dialog box return value is OK (usually sent from a button labeled OK).
2 Cancel The dialog box return value is Cancel (usually sent from a button labeled Cancel).
3 Abort The dialog box return value is Abort (usually sent from a button labeled Abort).
4 Retry The dialog box return value is Retry (usually sent from a button labeled Retry).
5 Ignore The dialog box return value is Ignore (usually sent from a button labeled Ignore).
6 Yes The dialog box return value is Yes (usually sent from a button labeled Yes).
7 No The dialog box return value is No (usually sent from a button labeled No).

Remarks

You can use this method to display a modal dialog box in your application. When this method is called, the code following it is not executed until after the dialog box is closed.

When a form is displayed as a modal dialog box, clicking the close form button (the button with an "X" at the top right of the form) causes the form to be hidden and the return value to be set to Cancel.

See Also

Applies to: ColorDialog | FolderBrowserDialog | FontDialog | Form | OpenFileDialog | SaveFileDialog


The CHM file was converted to HTML by chm2web software.