Form.Show Method (IWin32Window) (System.Windows.Forms)

Switch View :
ScriptFree
.NET Framework Class Library
Form.Show Method (IWin32Window)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Shows the form with the specified owner to the user.

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

Visual Basic

Public Sub Show ( _
	owner As IWin32Window _
)
C#

public void Show(
	IWin32Window owner
)
Visual C++

public:
void Show(
	IWin32Window^ owner
)
F#

member Show : 
        owner:IWin32Window -> unit 

Parameters

owner
Type: System.Windows.Forms.IWin32Window
Any object that implements IWin32Window and represents the top-level window that will own this form.
Exceptions

Exception Condition
InvalidOperationException

The form being shown is already visible.

-or-

The form specified in the owner parameter is the same as the form being shown.

-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 UserInteractive).

Remarks

You can use this method to display a non-modal form. When you use this method, the Owner property of the form is set to owner. The non-modal form can use the Owner property to get information about the owning form. Calling this method is identical to setting the Owner property of the non-modal and then calling the Show method.

Showing the form is equivalent to setting the Visible property to true. After the Show method is called, the Visible property returns a value of true until the Hide method is called.

Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 8 Release Preview, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 SP2, Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also

Reference