用vb设计一个简单的秒表

来源:百度知道 编辑:UC知道 时间:2024/05/23 02:01:28
请各位高手帮帮忙用VB设计一个秒表,要求显示00:00:00,还要有开始,停止,清空三个按扭

急急!!!!!!!!!!先谢谢咯

加一个控件label1 显示
加一个timer1 interval设为1000毫秒
过程里写:
static h,m,s
s=s+1
if s=60 then s=0:m=m+1
if m=60 then m=0:h=h+1
label1.caption=str(h)+":"+str(m)+":"+str(s)

这样就行了~
如果要很精确的 可以看这个
http://zhidao.baidu.com/question/22792233.html?fr=qrl3
用到了api函数 稍微复杂些