VBS计时器2

打开计时器,如果点击暂停,会显示你刚才事物所用的时间(以分钟为单位)

 1 dim c //控制循环
 2 c= vbyes
 3 
 4 while c<>vbno
 5 
 6 dim a
 7 a= 60*hour(now)+minute(now)
 8 
 9 dim b
10 b= msgbox("Stop counting now?",vbyesno, "CreatedByXuTao")
11 
12 if b=vbyes then
13 msgbox  "You've Spent " +cstr(60*hour(now)+minute(now)-a)+" minutes",,"Stop"
14 end if
15 
16 c= msgbox("Again?",vbyesno, "Tip")
17 wend

 

posted @ 2018-12-10 22:31  Edwin_Xu  阅读(415)  评论(0编辑  收藏  举报