Share via


WindowState Property [Visio 2003 SDK Documentation]

Gets or sets the state of a window.

intRet = object**.WindowState**

object**.WindowState** = intExpression

intRet     Long. A constant that identifies the state of the window.

object     Required. An expression that returns a Window object.

intExpression     Required Long. The new state of the window.

Version added

2000

Remarks

The values of intRet and intExpression can be a combination of the constants declared in the Visio type library in VisWindowStates.

Note  The varFlags parameter to the Add method for the Windows collection can be composed of the various bits of VisWindowStates.

If you specify conflicting bits, only one bit is used. For example, if you specify both visWSMaximized and visWSMinimized, the window is maximized.

The visWSVisible flag is ignored when setting the state of a window with the WindowState property. It is used in calls to the Add method for the Windows collection. Use the Visible property of the window to show or hide it. The visWSVisible flag is available only when this property is read.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to minimize the active drawing window.

Public Sub WindowState_Example()
 
    Dim vsoWindow As Visio.Window     

    'Get the active window.
    Set vsoWindow = ActiveWindow 

    'Minimize the active window.
    vsoWindow.WindowState = visWSMinimized

End Sub

Applies to | Window object

See Also | Type property | Visible property