我找到了一些启动画面的代码,但我需要解决一个问题:
当我运行我的HTA程序时,启动画面会正常弹出。但是,如果我点击我的桌面,那么启动画面就会消失,有什么方法可以解决这个问题吗?
<html>
<head>
<title>Splash Screen</title>
<script type="text/vbscript">
Dim oPopup
Set oPopup = window.createPopup()
Function goContext()
Dim oPopupBody
Set oPopupBody= oPopup.document.body
oPopupBody.innerHTML = oContext.innerHTML
call oPopup.show(275, 200, 400, 300, document.body)
End Function
</script>
</head>
<body onload="goContext()" onmousedown="oPopup.hide">
<!-- Splash Screen -->
<div ID="oContext" style="display:none" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
<div style="position:absolute; top:0; left:0; width:400px; height:300px; border:1px solid black; background:#eeeeee;" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
<div style="padding:20px; background:white; border-bottom:5px solid #cccccc" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
<b onselectstart="return false" ondragstart="return false" oncontextmenu="return false"><h2 align="center"><i>Game Launcher </i><small><sub>ver: 1.00</sub></small></h2></b>
</div>
<div style="padding:20px; font-size:8pt; line-height:1.5em; font-family:verdana; color:black;" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
<center onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
<marquee DIRECTION="UP" HEIGHT="100" WIDTH="300" SCROLLAMOUNT="1" onselectstart="return false">Le text goes here</marquee>
<br /><br />
<b>©2013 Petzl11 Development.</b>
</center>
</div>
</div>
</div>
<center>
<button onclick="goContext()">Show Splash Screen</button><br>
<b>Internet Explorer Only!</b>
</center>
</body>
</html>
这是我原本想要制作的,但是你帮助我的这个是完美的,下面这个是.vbs: Here是链接
答案 0 :(得分:1)
工作代码,经过一些交互式调试(样式属性未正确关闭)。
<html>
<head>
<HTA:APPLICATION selection="no" contextmenu="no" />
<title>Splash Screen</title>
<script type="text/vbscript">
Dim oPopup
Set oPopup = window.createPopup()
Function goContext()
Dim oPopupBody
Set oPopupBody= oPopup.document.body
oPopupBody.innerHTML = oContext.innerHTML
call oPopup.show(275, 200, 400, 300, document.body)
End Function
</script>
</head>
<body onload="goContext()" onmousedown="oPopup.hide">
<!-- Splash Screen -->
<div ID="oContext" style="display:none">
<div style="position:absolute; top:0; left:0; width:400px; height:300px; border:1px solid black;background:#eeeeee;">
<div style="padding:20px; background:white; border-bottom:5px solid #cccccc">
<b><h2 align="center"><i>Game Launcher</i> <small><sub>ver: 1.00</sub></small></h2></b>
</div>
<div style="padding:20px; font-size:8pt; line-height:1.5em; font-family:verdana; color:black;">
<center>
<marquee direction="up" height="100" width="300" scrollamount="1">Le text goes here</marquee>
<br><br>
<b>©2013 Petzl11 Development.</b>
</center>
</div>
</div>
</div>
<!-- End Splash Screen -->
<center>
<button onclick="goContext()">Show Splash Screen</button><br>
<b>Internet Explorer Only!</b>
</center>
</body>
</html>
请注意<HTA:APPLICATION>
元素和read through its documentation。