Partager via


WINDOWSTATE Attribute | windowState Property

Sets or gets the initial size of the HTML Application (HTA) window.

Syntax

HTML <HTA:APPLICATION WINDOWSTATE = sWindowSize... >
Scripting [ sWindowSize = ] HTA:APPLICATION.windowState

Possible Values

sWindowSize A String that specifies one of the following values.
normal
Default. Window is the default size for Windows Internet Explorer.
minimize
Window is not displayed on launch. Instead, the title of the minimized application appears in the taskbar.
maximize
Window is sized to fill the screen.

The property is read-only. The property has a default value of normal.

Remarks

Note  The windowState property is read-only; however, the WINDOWSTATE attribute can be used to set the initial value.

Example

This example shows how to get the windowState property.

<HTML>
<HEAD>
   <HTA:APPLICATION ID="oHTA"
    APPLICATIONNAME="myApp"
    WINDOWSTATE="maximize"
   >
   <SCRIPT>
      alert("windowState    = " + oHTA.windowState);
   </SCRIPT>
</HEAD>
<BODY SCROLL="no">

</BODY>
</HTML>

Code example: https://samples.msdn.microsoft.com/workshop/samples/author/hta/hta_allEX.hta

Applies To

HTA:APPLICATION

See Also

Introduction to HTML Applications (HTAs)