我需要将窗口定位到0,0
如何使用VBScript和HTA
执行此操作答案 0 :(得分:4)
只是为了避免脚本专家的混乱(头部和身体之间的脚本)并在.HTA中显示顶级(不在功能中)代码:
<html>
<!-- stolen & sanitized from:
!! http://blogs.technet.com/b/heyscriptingguy/archive/2005/10/10/how-can-i-center-an-hta-on-the-screen.aspx
-->
<head>
<title>TopLeft HTA</title>
<HTA:APPLICATION
APPLICATIONNAME="TopLeft HTA"
>
<SCRIPT Language="VBScript">
window.moveTo 0, 0
</SCRIPT>
</head>
<body></body>
</html>
答案 1 :(得分:2)
从The Scripting Guy中提取答案:
<html>
<head>
<title>My Awesome HTA</title>
<HTA:APPLICATION
ID="objHTA"
APPLICATIONNAME="Awesome HTA"
SCROLL="yes"
SINGLEINSTANCE="yes"
>
</head>
<SCRIPT Language="VBScript">
Sub Window_Onload
window.moveTo 0, 0
End Sub
</SCRIPT>
<!--/* the rest of you HTA goes here... */-->