当前位置:网站首页>HTA introductory basic tutorial | GUI interface of vbs script HTA concise tutorial, with complete course and interface beautification
HTA introductory basic tutorial | GUI interface of vbs script HTA concise tutorial, with complete course and interface beautification
2022-06-30 02:41:00 【CDamogu】
Background knowledge
HTA yes HTML Application Abbreviation (HTML Applications ), Is a new concept of software development , Direct will HTML Save as HTA The format of , Is an independent application software , And VB、C++ The software interfaces designed by programming languages are no different .
- HTA Similar to the structure of ordinary web pages , So it's easy to design , Of course HTA There are many unique attributes :
- HTA Although with HTML、JS and CSS To write , But it has much more authority than ordinary web pages .
- HTA Have all permissions for desktop programs ( Read and write files 、 Operating the registry, etc ),HTA It was originally designed as a desktop program .
- HTA Grammar is more important than HTML Still loose , Even
<html>、<body>And other marks can be omitted : - It can be used
<HTA:Application>To set HTA Appearance of the application , Such as title block 、 Border size, etc , Must be placed in .
List of properties
recommend html Table code generation https://www.tablesgenerator.com/html_tables
because CSDN Cannot show style , So it is shown in the form of screenshots , More intuitive reading , The following table source files CSDN download -HTA.tgn , Open the above link after downloading , Click on File,Load Table that will do 
Interface effect
The effect is as follows :LOGO+ company LOGO Just add a link by yourself , The following is only for the pictures found on the Internet , In case of any infringement, please inform us to delete .
Code
New file , And named it Example.hta Can be in Windows Open directly in
<html>
<head>
<title style="padding: 1px;margin: 1px;"> HTA Example GUI</title>
<meta content="text/html;charset=utf-8" style="background:Aqua;text-align:center;">
<HTA:APPLICATION ID="oHTA" APPLICATIONNAME="myApp" ICON="http://stackoverflow.com/favicon.ico"/>
<img src=" https://m-todo.gitee.io/m-todo-img/logo/bosch/BOSCH.png" style="width:17%;"></img>
<img src=" https://m-todo.gitee.io/m-todo-img/logo/bosch/BoschHuayu.png" style="width:25%;"></img>
</head>
<script> window.resizeTo(1500,500); var fso; var wsh; fso = new ActiveXObject("Scripting.FileSystemObject"); wsh = new ActiveXObject("WScript.Shell"); function checkcli(e){
fso.GetStandardStream(1).Write(e.type); window.close(); } function Run(strPath){
wsh.Run(strPath,1,true); } function Close(){
window.close(); } function Web(){
wsh.Run("cmd.exe /k start firefox http://www.dooccn.com/c/ &&\ echo complete"); } function MakeHexOnly(){
wsh.Run("cmd.exe /k C: && cd C:/Users/test && OnlyHex.bat &&\ echo The Hex Documents are saved in C:\Users\test "); } function MakeComplete(){
wsh.Run("cmd.exe /k C: && cd C:/Users/test && CompleteHex.bat &&\ echo The Hex Documents are saved in C:\Users\test "); } </script>
<style> body {
padding:0; margin:0;} ul {
list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; position: fixed; top: 0; width: 100%; } li {
float: left; } li a {
display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } li a:hover {
background-color: #4CAF50; color: white; } .labeltxt {
background-color: #480000; } h1{
font-family:"Times New Roman",Georgia,Serif; } </style>
<body style="background:light; text-align:left; padding: 1px;margin: 1px;" SCROLL="no">
<meta content="text/html;charset=utf-8" style="background:Aqua; text-align:left;">
<ul>
<li class="labeltxt"><a href="#"> Shortcut </a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 1</a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 2</a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 3</a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 4</a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 5</a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 6</a></li>
<li onclick="Run('file:///C:/Program%20Files%20(x86)/Microsoft%20Office/Office16/Outlook.exe')"><a href="#"> Shortcut 7</a></li>
<li onclick="Web()"><a href="#"> Shortcut 8</a></li>
</ul>
<div style="padding:0px;margin-top:02px;background-color:#C0C0C0;height:800px;">
<ul>
<li class="labeltxt"><a href="#"> Call script </a></li>
<li onclick="MakeHexOnly()"><a href="#"> Calling procedure 1</a></li>
<li onclick="MakeComplete()"><a href="#"> Calling procedure 2</a></li>
</ul>
<div style="padding:0px;margin-top:02px;background-color:#C0C0C0;height:800px;">
<ul>
<li class="labeltxt"><a href="#"> Shut down the program </a></li>
<li onclick="Close()"><a href="#Close"> close </a></li>
</ul>
<div style="padding:0px;margin-top:02px;background-color:#C0C0C0;height:800px;">
<MARQUEE>Hello Mushroomer</B><br><br>
</body>
</html>
边栏推荐
猜你喜欢

2.< tag-动态规划和0-1背包问题>lt.416. 分割等和子集 + lt.1049. 最后一块石头的重量 II

SSL证书格式转化的两种方法

速看 2021-2022年23项重大网络犯罪统计数据

桶排序

Shenzhen CPDA Data Analyst Certification in July 2022

Two methods of SSL certificate format conversion

Merge sort
![[dry goods sharing] the latest WHQL logo certification application process](/img/c3/37277572c70b0af944e594f0965a6c.png)
[dry goods sharing] the latest WHQL logo certification application process

快速排序

Ffmpeg source code
随机推荐
【干货分享】最新WHQL徽标认证申请流程
What about punctuation in the first column of unity text
如何使用SMS向客户传递服务信息?指南在这里!
Detailed explanation of minimum stack
Several key points recorded after reviewing redis design and Implementation
CMake教程系列-02-使用cmake代码生成二进制
Global and Chinese market of Kanban software 2022-2028: Research Report on technology, participants, trends, market size and share
LeetCode 3. 无重复字符的最长子串
SiteLock九个常见问题
Summary of knowledge points about eigenvalues and eigenvectors of matrices in Chapter 5 of Linear Algebra (Jeff's self perception)
CMake教程系列-03-依赖管理
Xunwei enzhipu ITop - imx6 Development Platform
迅為恩智浦iTOP-IMX6開發平臺
SQLite使用
Jupyter notebook显示k线图集合
FDA ESG规定:必须使用数字证书保证通信安全
Alphassl digital certificate
Raii memory management
JS advanced -h5 new features
CMake教程系列-05-选项及变量