How can I do this? Can someone please post generic example code?
Thanks much in advance for your assistance...
'-- x and y would be your desired pixel width and height:
window.resizeTo x, y
'-- to center:
window.moveTo ((screen.availWidth \ 2) - (x \ 2)), ((screen.availHeight \
2) - (y \ 2))
That code works on IE 5 and 6. I'm not sure about IE7.
--------------
<HEAD>
<TITLE>This is the Application Caption</TITLE>
<SCRIPT type="text/jscript">
// Always Set Size Here to Avoid Flicker
window.moveTo(0,0);
window.resizeTo(320,240);
</SCRIPT>
<HTA:APPLICATION ID="oApp"
APPLICATIONNAME="Splash Screen"
Per my comments embedded. I hardcode the size there when possible to avoid
flicker.
"mayayana" <mayaXX...@mindXXspring.com> wrote in message
news:hgs%h.8664$j63....@newsread2.news.pas.earthlink.net...
You cannot easily prevent minimizing or maximising but you can set the
normal size as locked ... right in the HTA header itself. Rather
than, defining a thick border, define a dialog border:
<hta:application
border=dialog
.........
But you _can_...
<HTML>
<HEAD>
<SCRIPT type="text/jscript">
// Always Set Size Here to Avoid Flicker
window.moveTo(0,0);
window.resizeTo(400,200);
</SCRIPT>
<TITLE>Hello, World!</TITLE>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
CAPTION="yes"
MINIMIZEBUTTON="no"
MAXIMIZEBUTTON="no"
BORDER=dialog
>
</HEAD>
<BODY SCROLL="no">
This HTA is...<BR>
<BR>
...is sized/moved without flicker<BR>
...has no min/max buttons <BR>
...is not resizable
</BODY>
</HTML>
--
Michael Harris
Microsoft.MVP.Scripting