Click to return to the DHTML, HTML     
HTML Applications Overvie...     APPLICATION Attribute     HTML Applications Referen...    
Web Workshop  |  DHTML, HTML & CSS

HTA:APPLICATION Element | HTA:APPLICATION Object


Enables an extended object model for building HTML Applications (HTA).

XML Syntax

<HTA:APPLICATION
    APPLICATIONNAME=value
    BORDER=thick | dialog | none  | thin 
    BORDERSTYLE=normal | complex | raised  | static  | sunken  
    CAPTION=YES | NO
    ICON=value
    ID=value
    MAXIMIZEBUTTON=YES | NO
    MINIMIZEBUTTON=YES | NO
    SHOWINTASKBAR=YES | NO
    SINGLEINSTANCE=YES | NO
    SYSMENU=YES | NO
    VERSION=value
    WINDOWSTATE=normal | maximize | minimize
>

Members

Remarks

You can create an HTA by saving an HTML page with an .hta file extension. However, to take advantage of the applications-oriented functionality discussed in this reference, you must include the HTA:APPLICATION tag and position it within the paired HEAD tag to take effect.

You can turn off the scroll bars for the application window by including SCROLL="no" in the BODY tag.

Example

This example retrieves all the properties exposed by HTA:APPLICATION.

Sample Code

<HTML>
<HEAD>
  <TITLE>HTA Demo</TITLE>
    <HTA:APPLICATION ID="oHTA"
     APPLICATIONNAME="myApp"
     BORDER="thin"
     BORDERSTYLE="normal"
     CAPTION="yes"
     ICON=""
     MAXIMIZEBUTTON="yes"
     MINIMIZEBUTTON="yes"
     SHOWINTASKBAR="no"
     SINGLEINSTANCE="no"
     SYSMENU="yes"
     VERSION="1.0"
     WINDOWSTATE="maximize"
    >

  <SCRIPT>

  /* This function also retrieves the value of the commandLine property,
     which cannot be set as an attribute  */
   
  function window.onload()
  {
     sTempStr = "applicationName  = " + oHTA.applicationName + "\n" + 
                "border           = " + oHTA.border          + "\n" +
                "borderStyle      = " + oHTA.borderStyle     + "\n" + 
                "caption          = " + oHTA.caption         + "\n" +
                "commandLine      = " + oHTA.commandLine     + "\n" +
                "icon             = " + oHTA.icon            + "\n" +
                "maximizeButton   = " + oHTA.maximizeButton  + "\n" +
                "minimizeButton   = " + oHTA.minimizeButton  + "\n" + 
                "showInTaskBar    = " + oHTA.showInTaskbar   + "\n" +
                "singleInstance   = " + oHTA.singleInstance  + "\n" +  
                "sysMenu          = " + oHTA.sysMenu         + "\n" + 
                "version          = " + oHTA.version         + "\n" + 
                "windowState      = " + oHTA.windowState     + "\n" ;
  
     oPre.innerText = sTempStr;  
  }
  </SCRIPT>
</HEAD>
<BODY SCROLL="no">
  <PRE ID=oPre>  </PRE>
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

See Also

HTML Applications Overview



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.