操作系统  办公  实用知识  设计  开发  WEB开发  移动开发  数据库  软件工程  网管  安全  管理  信息化  答疑  渠道 

VBScript的扫描进度条程序

2006-9-25 网友评论 0 条 点击进入论坛

<title>进度条</title>
<style>
BODY {background: #CCCCFF} BODY { overflow:hidden }
P.txtStyle {color: Navy; font-family: Verdana; font-size: 10pt; font-weight: bold; margin-left: 10px }
input.pbStyle {color: Navy; font-family: Wingdings; font-size: 10pt; background: Silver; height: 20px; width: 340px }
</style>
<div id="objProgress" class="Outer"></div>
<CENTER>
<b>
<SPAN id=txtMilestone class=''txtStyle'' style=''margin-left: 10px''></SPAN>
<font color=green>
<SPAN id=txtRemarks class=''txtStyle'' style=''margin-left: 10px''></SPAN>
</font>
<b>
<br>
<br>
<input type=''text'' id=''pbText'' class=''pbStyle'' value='''' >
<br>
<br>
<input type=''button'' value=''Cancel'' onclick=''SetReturnFlag("quit")'' >
</CENTER>
<form name=''secret'' > <input type=''hidden'' name=''pubFlag'' value=''run'' ></form>
<SCRIPT LANGUAGE=''VBScript'' >
Sub SetReturnFlag(sFlag)
secret.pubFlag.Value = sFlag
txtMileStone.style.color = "Red"
txtRemarks.style.color = "Red"
End Sub
Function PctComplete(nPct)
pbText.Value = String(nPct," ") & String(4,"n")
End Function
Sub UpdateProgress()
Dim intStep
Dim intDirection

If (IsNull(objProgress.getAttribute("Step")) = True) Then
intStep = 0
Else
intStep = objProgress.Step
End If

if (IsNull(objProgress.GetAttribute("Direction"))=True) Then
intDirection = 0
Else
intDirection = objProgress.Direction
End If

if intDirection=0 then
intStep = intStep + 1
else
intStep = intStep - 1
end if

Call PctComplete(intStep)

if intStep>=23 then
intDirection=1
end if
if intStep<=0 then
intDirection=0
end if
objProgress.SetAttribute "Step", intStep
objProgress.SetAttribute "Direction", intDirection
Window.setTimeout GetRef("UpdateProgress"), 80
End Sub
Sub DialogHardTimeout()
SetReturnFlag("quit")
End sub
Sub Window_OnLoad()
theleft = (screen.availWidth - document.body.clientWidth) / 2
thetop = (screen.availHeight - document.body.clientHeight) / 2
window.moveTo theleft,thetop
Window.setTimeout GetRef("UpdateProgress"), 80
Window.setTimeout GetRef("DialogHardTimeout"), 3600000
End Sub
</SCRIPT>

已有 0 位对此文章感兴趣的网友发布了看法    
我来评两句 登录邮箱: 密码:
  匿名发表
今日推荐
技术文库(共有 46430 篇文章)
操作系统
办公软件
实用知识
网络管理
软件开发
WEB开发
软件工程
数据库
设计在线
信息安全
行业信息化
管理信息化
重点推荐
电子杂志订阅
点击电子杂志名称查看样刊
输入E-mail地址即可订阅
E-mail