VBScript IE Window Always on Top / Cannot Move

Hi,

How can I ensure that my IE window always opens in a fixed position, is always on top and cannot be moved? I have created a ticker app which I always want at the top of the screen where no other applications can hide it from view.

Thanks,

Mike
LVL 1
Barnardos_2LSAsked:
Who is Participating?
 
yehudahaConnect With a Mentor Commented:
i don't think there is nay way to do it with hta but

i wrote a code on the same idea from this article:
http://www.microsoft.com/technet/scriptcenter/topics/htas/autorefresh.mspx

i used a timer to call a sub and move the windows back, but notice holding
the windows end to much time will cause an error

 try this code maybe it will help you:
<html>
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My HTML Application</title>
<SCRIPT Language="VBScript">
 
    Sub Window_Onload
        window.resizeTo window.screen.width,window.screen.height
        window.moveto 0,0
        window.setInterval "moveback", 500, "vbscript"
    End Sub
    Sub moveback()
        window.moveto 0,0
    End Sub
 
</SCRIPT>
<hta:application
 applicationname="MyHTA" 
 border="dialog"
 borderstyle="dialog"
 caption="My HTML Application"
 contextmenu="no"
 icon="myicon.ico"
 maximizebutton="no"
 minimizebutton="no"
 navigable="no"
 scroll="no"
 selection="no"
 showintaskbar="yes"
 singleinstance="yes"
 sysmenu="no"
 version="1.0"
 windowstate="maximize"
>
</head>
<body>
<!-- HTML goes here -->
 
</body>
</html>

Open in new window

0
 
yehudahaCommented:
<html>
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My HTML Application</title>
<SCRIPT Language="VBScript">
 
    Sub Window_Onload
        window.resizeTo window.screen.width,window.screen.height
        window.moveto 0,0
        window.setInterval "moveback", 500
    End Sub
    Sub moveback()
        window.moveto 0,0
    End Sub
 
</SCRIPT>
<hta:application
 applicationname="MyHTA"
 border="dialog"
 borderstyle="dialog"
 caption="My HTML Application"
 contextmenu="no"
 icon="myicon.ico"
 maximizebutton="no"
 minimizebutton="no"
 navigable="no"
 scroll="no"
 selection="no"
 showintaskbar="yes"
 singleinstance="yes"
 sysmenu="no"
 version="1.0"
 windowstate="maximize"
>
</head>
<body>
<!-- HTML goes here -->
 
</body>
</html>
0
 
yehudahaCommented:
opps

the same code don't worry
0
 
Barnardos_2LSAuthor Commented:
Excellent. Thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.