The code is as follows: <!--
***************************************************************************
'*I have always wanted to make something I use to learn, but I have never had time. I originally wanted to do it with asp (using netbox). , I've always
'* Want to learn programs, vb but don't have time to learn. Now I want to make one with c#, but I don't have much time. I occasionally go to the official vbscript to find it
'*This good hta so I spent two or three days making one, hoping everyone would like it.
'*Author: dxy(reterry)
'*version:1.0
'*QQ: 461478385
'*Email:[email protected]
***************************************************************************
//-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<hta:application
id="dxymdb"
scroll="yes"
singleinstance="yes"
border="thin"
windowstate="maximize"
icon="dxy.ico"
>
<title>My first hta program</title>
<style type="text/css">
<!--
BODY
{
scrollbar-face-color : #D8DBDF;
scrollbar-highlight-color : #FFFFF;
scrollbar-shadow-color : #C1C6CC;
scrollbar-3dlight-color : #ABB1B3;
scrollbar-arrow-color : #7F8996;
scrollbar-track-color : #F8FAF9;
scrollbar-darkshadow-color : #ABB1B3;
}
body,td,th {
font-size: 10pt;
color: #FFFFF;
}
body {
background-color: #3a6ead;
}
a {
font-size: 9pt;
color: #000000;
}
a:link {
text-decoration: none;
color: #FFFF33;
}
a: visited {
text-decoration: none;
color: #FFFF33;
}
a:hover {
text-decoration: none;
color: #FFffff;
}
a:active {
text-decoration: none;
}
.style4 {font-weight: bold}
.b {
border-bottom-width: 1px;
border-bottom-style: dashed;
border-bottom-color: #BFDFFF;
}
.style9 {color: #ffff33}
input {
font-size:12px;
}
-->
</style>
</head>
<script language="vbscript">
'Add to the number of smart display information
strComputer = "."
Set objWMIService = GetObject("Winmgmts://" & strComputer & "/root/cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
thewidth = objItem.ScreenWidth
theheight = objItem.ScreenHeight
Next
'-------------------------
const adUserClient=3
sub window_onload()
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"