Export (0) Print
Expand All
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 _
HRESULT __stdcall get_WindowState(
   /* [out, retval] */ vsWindowState* retVal
HRESULT __stdcall put_WindowState(
   /* [in] */ vsWindowState NewValue
public vsWindowState WindowState {get; set;}
[JScript .NET]
public function get WindowState() : vsWindowState
public function set WindowState(
   NewValue : vsWindowState


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

Return Value

Returns a vsWindowState Constants constant.


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

© 2014 Microsoft