WindowState Property

Applies To

Window object.

Description

Returns or sets a numeric value specifying the visual state of the window. Read/write.

Settings

The WindowState property returns or sets the following values:

Constant

Value

Description

vbext_ws_Normal

0

(Default) Normal

vbext_ws_Min

1

Minimized (minimized to an icon)

vbext_ws_Max

2

Maximized (enlarged to maximum size)


See Also

ActiveWindow property, MainWindow property, SetFocus method, Visible property.

Example

The following example uses the WindowState property to return the visual state of the specified window. The value returned is a number that corresponds to a predefined constant that specifies the visual state of a window.

Debug.Print Application.VBE.Windows(9).WindowState