| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 662 人关注过本帖
标题:求助!VB制作一个 源程序代码记时器
只看楼主 加入收藏
niwo
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-6-19
收藏
 问题点数:0 回复次数:1 
求助!VB制作一个 源程序代码记时器
要求:
1.如图 暂停1对应lable1 暂停2对应lable2 暂停3对应lable3
2.单击 COMMAND1开始记时 按钮 随即Label1 Label2 Label3 都开始记时! 在单击暂停1时 Label1 停止记时 在单击暂停2时 Label2 停止记时 在单击暂停3时 Label3 停止记时


希望有哪位高手帮我下!急求!~~~~~~~
我的QQ是:121269875



图片附件: 游客没有浏览图片的权限,请 登录注册

搜索更多相关主题的帖子: 记时 单击 代码 
2007-06-19 18:27
liu008yl
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-6-19
收藏
得分:0 

开始控制的时候有点难,不会弄,如何开始将三个记时器都置零,还望高手指教.本人只能做到最简单的,惭愧.
Option Explicit
Dim T1 As Date
Private Sub Command1_Click()

End Sub

Private Sub Command2_Click()
Timer1.Enabled = False

End Sub

Private Sub Command3_Click()
Timer2.Enabled = False

End Sub

Private Sub Command4_Click()
Timer3.Enabled = False
End Sub

Private Sub Form_Load()
T1 = Time()
Text1 = T1
End Sub
Private Sub Timer1_Timer()
Dim hh As Long
Dim mm As Long
Dim ss As Long
Dim mTs As Date
mTs = Time()
hh = DateDiff("h", T1, mTs)
mm = DateDiff("n", T1, mTs)
ss = DateDiff("s", T1, mTs)


Label3.Caption = Format(hh & ":" & mm & ":" & ss, "hh:mm:ss")

End Sub

Private Sub Timer2_Timer()
Dim hh As Long
Dim mm As Long
Dim ss As Long
Dim mTs As Date
mTs = Time()
hh = DateDiff("h", T1, mTs)
mm = DateDiff("n", T1, mTs)
ss = DateDiff("s", T1, mTs)

Label2.Caption = Format(hh & ":" & mm & ":" & ss, "hh:mm:ss")

End Sub

Private Sub Timer3_Timer()
Dim hh As Long
Dim mm As Long
Dim ss As Long
Dim mTs As Date
mTs = Time()
hh = DateDiff("h", T1, mTs)
mm = DateDiff("n", T1, mTs)
ss = DateDiff("s", T1, mTs)

Label1.Caption = Format(hh & ":" & mm & ":" & ss, "hh:mm:ss")
End Sub

Private Sub 开始记时_Click()

End Sub

2007-06-20 22:15
快速回复:求助!VB制作一个 源程序代码记时器
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016814 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved