ICON Attribute | icon Property

Sets or gets the name and location of the icon specified in the HTML Application (HTA).

Syntax

HTML <HTA:APPLICATION ICON = sIcon... >
Scripting [ sIcon = ] HTA:APPLICATION.icon

Possible Values

sIcon A String that specifies an icon for the application.
System Application Icon
The HTA uses the System Application Icon when nothing is specified, but the System Application Icon is not an actual value.

The property is read-only. The property has no default value.

Remarks

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

The ICON attribute recognizes the standard 32x32 pixel Windows format for .ico image files.

The HTA uses the System Application Icon when nothing is specified, but the System Application Icon is not an actual value.

Example

This example shows how to get the icon property.


<HTML>
<HEAD>
   <HTA:APPLICATION ID="oHTA"
    APPLICATIONNAME="myApp"
    ICON="graphics/face01.ico" 
   >
   <SCRIPT>
      alert ("icon    = " + oHTA.icon);
   </SCRIPT>
</HEAD>
<BODY SCROLL="no">

</BODY>
</HTML>

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

Applies To

HTA:APPLICATION

See Also

Introduction to HTML Applications (HTAs)

Community Additions

Show:
© 2014 Microsoft