Reputation: 9541
I need to position the Window to 0,0
How can I do this using VBScript and HTA
Upvotes: 2
Views: 7797
Reputation: 38755
Just to avoid the the Scripting Guy's chaos (script between head and body) and to show Top Level (out of function) code in .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>
Upvotes: 4
Reputation: 7490
Extracting the answer from The Scripting Guy it would be:
<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... */-->
Upvotes: 2