2

我需要将 Window 定位到 0,0

如何使用 VBScript 和 HTA 做到这一点

4

2 回答 2

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>
于 2012-05-23T15:09:04.847 回答
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...   */-->
于 2012-05-23T14:43:56.760 回答