想制作有按扭的窗口,可以用HTA ,以下是一个示例,把以下代码复制到记事本,另存为 BrgoMenu.hta 即可。效果如图,既有背景音乐,又有活动文字说明。(以下代码中,&nbsp中的&是中文字符,使用时请还原为英文的&,因为&加上nbsp的组合是表示空格,在网站上贴出来就是显示空格,不能显示此组合字,想获得如图效果,可以下载附件,其中还有子窗口代码供参考)想增加按扭或修改提示内容,可以用记事本来编辑以上代码即可。- <title>备份还原快手2.0 By: newxso</title>
- <SCRIPT LANGUAGE="VBScript">
- window.resizeTo 473, 190
- window.moveTo(screen.width-500)/2,(screen.height-400)/2
- Set objShell = CreateObject ("Wscript.Shell")
- Sub BackupScript
- objShell.Run("%comspec% /c start brgo.exe 1"),0 ,TRUE
- Self.Close()
- End Sub
- Sub RestoreScript
- objShell.Run("%comspec% /c start brgo.exe 2"),0 ,TRUE
- Self.Close()
- End Sub
- Sub BootScript
- objShell.Run("%comspec% /c start BootSet.hta"),0 ,TRUE
- End Sub
- Sub HddScript
-
- objShell.Run("%comspec% /c start HddInfo.hta"),0 ,TRUE
- End Sub
-
- Sub HelpScript
- objShell.Run("%comspec% /c notepad.exe 使用说明.txt"),0 ,TRUE
- End Sub
- </SCRIPT>
- <body bgcolor="#DCDCDC">
- <fieldset><legend>请用鼠标点击选择以下项目:</legend>
- <td valign="top"><font color="#D200D2" size="2">
- <marquee behavior="alternate" scrollamount="4">┏点击┓</marquee>
- <input id=runbutton class="button" type="button" value="备份系统" name="backup_button"
- onClick="BackupScript">
- <input id=runbutton class="button" type="button" value="还原系统" name="Restore_button"
- onClick="RestoreScript">
- <input id=runbutton class="button" type="button" value="引导模式" name="boot_button"
- onClick="BootScript">
- <input id=runbutton class="button" type="button" value="磁盘信息" name="hdd_button"
- onClick="HddScript">
- <input id=runbutton class="button" type="button" value="使用帮助" name="help_button"
- onClick="HelpScript">
- <BR>
- <BR>
- <BR>
- <td valign="top"><font color="#FF60AF" size="2">
- <marquee scrollamount="2" direction="left">背景音乐: 谭咏麟 - 无法不想你</marquee>
- <fieldset>
- <table border="0" cellspacing="1" width="100%">
- <td valign="top"><font color="#01B468" size="2">
- <marquee scrollamount="4" direction="left">备份还原快手 是一个可以在Windows下完成Ghost备份还原的程序 简单到你只需点一下鼠标即可 Made: newxso QQ:453623262 Email:aximail@126.com</marquee>
- </table>
- <body scroll="no">
- <HTA:APPLICATION contextmenu="no" MaximizeButton="No" ICON="brgo.ico">
- <BGSOUND SRC="无法不想你.wma" Loop="-1">
- </BODY>
复制代码
|