HTA is the abbreviation of HTML Application (HTML application), is a new concept of software development, directly to save the HTML into the HTA format, is an independent application software, and VB, C + + and other programming language design software interface is no different
HTA is the abbreviation of HTML Application (HTML application), is a new concept of software development, directly to save the HTML into the HTA format, is an independent application software, and VB, C + + and other programming language design software interface is no different.
In general, an HTA can be written in VBScript and JScript, and the VBS feature is more powerful, after all, Microsoft's own stuff. HTA can operate the database, the interface can be realized with html+css, it is very convenient to write some simple application.
At the moment, the script house is tidying up some good HTA examples, and your favorite friends can come here (http://www.jb51.net/list/list_110_1.htm) to view them.
HTA instance
Here's an example of an HTA:
Copy Code code as follows:
<html>
<head>
<title>; Example of the first HTA </title>
<style>
p {Font-size:24;cursor:hand}
</style>
</head>
<body>
<center>
<p>
HTA
HTML Application
HTML Application
</p>
</center>
</body>
</html>
Copy the above code into any text editor and save it as *.hta, and you can see the effect directly by double-clicking it.
HTA Properties
The HTA is similar to a normal web page structure, so it's easy to design, and of course the HTA has many of its own unique attributes:
The requirements of the grammar
An HTA requires more syntax than HTML, and even tags like
Note: The above is all the code for the entire HTA file.
The look of an HTA
You can use <HTA:Application>; to set the appearance of your HTA application, such as the title bar, border size, and so on, which must be in
Copy Code code as follows:
<html>
<head>
<title>; Example of the first HTA </title>
<hta:application id= "OHTA"
applicationname= "MYAPP"
border= "Thin"
borderstyle= "Normal"
caption= "Yes"
icon= "Filename.ico"
maximizebutton= "Yes"
minimizebutton= "Yes"
showintaskbar= "No"
singleinstance= "No"
sysmenu= "Yes"
version= "1.0"
windowstate= "Normal"
scroll= "Yes" >
</head>
<body>
<center>
HTA
HTML Application
HTML Application
<button onclick= "Self.close ()" style= "Font-size:18" >; departure </button>
</center>
</body>
</html>
Attribute Description:
ApplicationName Property (ApplicationName)
This property sets the name of the HTA.
Border Property (border)
This property is the window border type set to an HTA, and the default value is thick.
It can be set to thick the specified window as a thick border
dialog window specifies a dialog box
None specifies a window without Borders
thin specifies that the window is a narrow border
BorderStyle Property (BorderStyle)
This property sets the border format for the HTA window, and the default value is normal.
It can be set to
Normal normal border format
Complex bump Format combo Border
raised extruded 3D border
Static 3D border format
Sunken recessed 3D Border
Caption Property (caption)
This property sets whether the HTA window displays a title bar or caption, and the default value is yes.
Icon Property (icon)
This property sets the icon for the application.
Maⅺmizebutton Property (Maximizebutton)
This property sets whether the Maximize button is displayed in the HTA window, and the default value is yes.
Minimizebutton Property (Minimizebutton)
This property sets whether the minimized button is displayed in the HTA window, and the default value is yes.
ShowInTaskbar Property (ShowInTaskbar)
This property indicates whether this application is displayed in the taskbar, and the default value is yes.
SingleInstance Property (singleinstance)
This property is set whether this application can run only once. The secondary property is identified with the ApplicationName property, and the default value is No.
Sysmenu Property (Sysmenu)
This property sets whether the System menu is displayed in the HTA window, and the default value is yes.
Version Property (version)
This property sets the version of the application and the default value is null.
WindowState Property (WindowState)
This property sets the initial size of the HTA window, and the default value is normal.
It can be set to normal default size
Minimize the
Maximize maximized
Scroll property (Scroll)
This property displays a vertical scroll bar at the right end and the default is yes