无法禁用边框.hta splashscreen

时间:2017-07-16 21:11:37

标签: html vbscript hta

我尝试创建一个简单的hta,在启动时显示一个简单的启动画面。

它应该显示图像,没有边框,没有滚动条,没有关闭按钮。我显示5秒然后自动关闭。在后台它开始一个过程。

唯一不起作用的是它没有边界。

见图:The white borders are not supposed to be there

这是代码:

<html>
<hta:application
    applicationname="splash load"
    id="splashload"
    version="1.0"
    border="none"
    innerborder="no"
    caption="no"
    sysmenu="no"
    maximizebutton="no"
    minimizebutton="no"
    icon="loader2.ico"
    scroll="no"
    scrollflat="yes"
    singleinstance="yes"
    showintaskbar="no"
    contextmenu="no"
    selection="no"
/>

<script language="VBScript">
    Sub CenterWindow(x,y)        
        window.resizeTo x, y      
        iLeft = window.screen.availWidth/2 - x/2      
        itop = window.screen.availHeight/2 - y/2    
        window.moveTo ileft, itop      
    End Sub    
    Sub Window_OnLoad
        CenterWindow 400,300
        iTimerID = window.setInterval("ShowSplash", 5000)
        Set objShell = CreateObject("Wscript.Shell")
        objShell.Run """%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\LCDMisc64"""
    End Sub
    Sub ShowSplash
        Splash.Style.Display = "None"
        Window.Close()
    End Sub

</script>

<body>
    <div id="Splash">
        <p>
            <img src="8.gif"/>
        </p>
    </div>
</body>
</html>

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

我在这里帮助改写了这件事。

我认为它现在正常运作:

<html>
<head>
    <script Language="VBScript">
        Sub CenterWindow(x,y)        
            window.resizeTo x, y      
            iLeft = window.screen.availWidth/2 - x/2      
            itop = window.screen.availHeight/2 - y/2    
            window.moveTo ileft, itop      
        End Sub
        Sub window_onload
            CenterWindow 400,300
            window.setTimeout"Script", 5000, "VBScript"
        End Sub
        Sub Script
            Set obj=CreateObject("Wscript.shell")
            obj.run """%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\LCDMisc64"""
            Self.close
        End Sub
    </script>

    <hta:application
        applicationname="splash load"
        id="splashload"
        version="1.0"
        border="none"
        innerborder="no"
        caption="no"
        sysmenu="no"
        maximizebutton="no"
        minimizebutton="no"
        icon="loader2.ico"
        scroll="no"
        scrollflat="yes"
        singleinstance="yes"
        showintaskbar="no"
        contextmenu="no"
        selection="no"
    />

    <title>title is useless here :D</title>
    <style type="text/css">
    .bg {background-image:url(8.gif)}
    </style>
</head>
<body class="bg"></body>
</html>