Click to return to the DHTML, HTML     
SHOWINTASKBAR Attribute |...     SYSMENU Attribute | sysMe...     HTML Applications Referen...    
Web Workshop  |  DHTML, HTML & CSS

SINGLEINSTANCE Attribute | singleInstance Property


Retrieves whether only one instance of the specified HTML Application (HTA) can run at a time.

Syntax

HTML<HTA:APPLICATION SINGLEINSTANCE=bOpen>
Scripting[ bOpen = ] oHTA.singleInstance

Possible Values

bOpen Boolean that specifies one of the following values:
yesOnly one instance of the specified application can run at a time.
noMultiple instances of the specified application can run at the same time.

The property is read-only with a default value of no.

Remarks

When set to true, the singleInstance property checks the value of the applicationName property before launching an instance of the application. For this check to be valid, the applicationName property must have a unique value assigned to it. You can use the applicationName property to identify a single application, regardless of the URL used to access it.

Example

This example shows how to retrieve the singleInstance property.

Sample Code

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

</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

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
HTA:APPLICATION

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.