| Visual Basic (Declaration) | |
|---|---|
Overloads Public Function ShowDialog( _ ByVal owner As IWin32Window _ ) As DialogResult | |
| C# | |
|---|---|
public DialogResult ShowDialog( IWin32Window owner ) | |
Parameters
- owner
- Any object that implements System.Windows.Forms.IWin32Window that represents the top-level window that will own the modal dialog box.
Return Value
One of the System.Windows.Forms.DialogResult values.| Exception | Description |
|---|---|
| System.ArgumentException | The form specified in the owner parameter is the same as the form being shown. |
| System.InvalidOperationException | The form being shown is already visible. -or- The form being shown is disabled. -or- The form being shown is not a top-level window. -or- The form being shown as a dialog box is already a modal form. -or- The current process is not running in user interactive mode (for more information, see System.Windows.Forms.SystemInformation.UserInteractive). |