<html><head><title>
</title>
<hta:application id=myHta
applicationName=myApp />
</head>
<body bgcolor=buttonface
style="border: none;
font: 8pt sans-serif"
scroll=no text=buttontext>
Hello world!
</body></html>
Parameter in HTML | in JScript | Value (i) ( default ) | Designation |
---|---|---|---|
APPLICATIONNAME | applicationName | line ( no ) | The unique name of the application. |
INNERBORDER | innerBorder | yes, no ( yes ) | The presence of an internal curb. |
BORDERSTYLE | borderStyle | normal, complex, raised, static, sunken ( normal ) | Internal type of curb. |
BORDER | border | thick, dialog, thin, none ( thick ) | External type of curb. |
CAPTION | caption | yes, no ( yes ) | The presence of the title. |
Not | commandLine | Only for reading. ( full path to this "* .hta" ) | Command line content |
CONTEXTMENU | contextMenu | yes, no ( yes ) | Right-click context menu. |
SELECTION | selection | yes, no ( yes ) | The ability to select text within the HTA . |
ICON | icon | URL ( no ) | Path to the icon ( * .ico ). |
MAXIMIZEBUTTON | maximizeButton | yes, no ( yes ) | Existence of the "expand" button. |
MINIMIZEBUTTON | minimizeButton | yes, no ( yes ) | The presence of the "collapse" button. |
SCROLL | scroll | yes, no, auto ( yes ) | The presence of scrolling. |
SCROLLFLAT ( IE 5.5+ ) | scrollFlat | yes, no ( no ) | Scrolling style. |
SHOWINTASKBAR | showInTaskBar | yes, no ( yes ) | Display in the taskbar. |
SINGLEINSTANCE | singleInstance | yes, no ( no ) | Prohibit the launch of the second instance. |
SYSMENU | sysMenu | yes, no ( no ) | The presence of the system menu. |
VERSION | version | line ( no ) | HTA version. |
WINDOWSTATE | windowState | normal, minimize, maximize ( normal ) | The initial state of the window. |
NAVIGABLE ( IE 5.5+ ) | navigable | yes, no ( no ) | Clicking the link will happen in the HTA window. |
Note :
If you do not specify theBORDER
parameter or specifyBORDER="thick"
, then the program window size can be changed with the mouse, in other cases (BORDER = thin || dialog || none
), the window size cannot be changed.
winWidth
, winHeight
, winPositionX
and winPositionY
. But you can cure it yourself.<html><head>
<hta:application id=hta_id
applicationName=hta_name
showInTaskBar=no
caption=no
innerBorder=no
selection=no
scroll=no
contextmenu=no />
<script language=javascript>
var winWidth=450; //
var winHeight=120; //
//
window.resizeTo(winWidth, winHeight);
//
var winPosX=screen.width/2-winWidth/2;
var winPosY=screen.height/2-winHeight/2;
window.moveTo(winPosX, winPosY);
</script>
</head>
<body bgcolor=buttonface text=buttontext
style="padding: 2px;font: 8pt 'MS Sans serif'">
<div> ...
, , ...<br>
, ...<br>
, ? ;).</div>
<div align=right><br> ALT+F4.</div>
</body></html>
Source: https://habr.com/ru/post/40707/
All Articles