CommonDialog.ShowDialog Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Runs a common dialog box with a default owner.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member ShowDialog : unit -> DialogResult

Return Value

Type: System.Windows.Forms.DialogResult

DialogResult.OK if the user clicks OK in the dialog box; otherwise, DialogResult.Cancel.

This method implements RunDialog.

The following code example uses the ColorDialog implementation of CommonDialog and illustrates creating and showing a dialog box. This example requires that the method is called from within an existing form, which has a TextBox and Button placed on it.

No code example is currently available or this language may not be supported.

PrintingPermission

to print from a PrintDialog. Associated enumeration: PrintingPermissionLevel.SafePrinting

UIPermission

for safe subwindows to call this method. Associated enumeration: UIPermissionWindow.SafeSubWindows

.NET Framework
Available since 1.1
Return to top
Show: