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
ID
Top
Expand Minimize

WindowState Property

Visual Studio .NET 2003

Sets or returns the state of the window, whether it's minimized, normal, and so forth.

[Visual Basic .NET]
Public Property WindowState() As vsWindowState
[Visual Basic 6]
Property Get WindowState() As vsWindowState
Property Let WindowState( _
   ByVal NewValue As vsWindowState _
) 
[C++]
HRESULT __stdcall get_WindowState(
   /* [out, retval] */ vsWindowState* retVal
);
HRESULT __stdcall put_WindowState(
   /* [in] */ vsWindowState NewValue
);
[C#]
public vsWindowState WindowState {get; set;}
[JScript .NET]
public function get WindowState() : vsWindowState
public function set WindowState(
   NewValue : vsWindowState
)

Parameters

ThisWindow
Required. A vsWindowState constant representing the state of the window.

Return Value

Returns a vsWindowState Constants constant.

Example

Since the WindowState property sets or returns whether a window is maximized, minimized, or normal, the environment should be in MDI mode for the following to work correctly.

Sub WindowStateExample()
   Dim win As Window
   win = DTE.ItemOperations.NewFile("General\Text File")
   MsgBox("Windowstate: " & (win.WindowState.ToString))
End Sub

See Also

Applies To: Window Object

Show:
© 2015 Microsoft