问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

跪求 vb多功能计时器代码 要有时钟 秒表 和倒计时的功能,秒表有暂停,开始功能的

发布网友 发布时间:2022-05-07 18:45

我来回答

2个回答

热心网友 时间:2023-11-08 04:54

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-08 04:54

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-08 04:54

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-08 04:55

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub

热心网友 时间:2023-11-08 04:54

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-08 04:55

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub

热心网友 时间:2023-11-08 04:55

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub

热心网友 时间:2023-11-08 04:54

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-08 04:55

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub

热心网友 时间:2023-11-08 04:55

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub

热心网友 时间:2023-11-30 05:52

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-30 05:53

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub

热心网友 时间:2023-11-08 04:55

简单的么,用timer控件做,精确些的么用,timer函数做.
时钟和倒计时很简单的了自己做一下
下面是 一个秒表程序,command 3个,label 1个.

Option Explicit

Dim PP As Boolean
Dim SS As Boolean
Dim TT As Single

Private Sub Command1_Click() '开始
TT = 0
PP = False
SS = False
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command2.Caption = "暂停"

tmr

End Sub

Private Sub tmr() '秒表
Dim t As Single
t = Timer

Do

showTT Timer - t + TT
DoEvents

Loop Until SS Or PP
TT = Timer - t + TT

End Sub
Private Sub showTT(ByVal t As Single)
Dim h As Integer
Dim s As String

h = Int(t / 3600)
t = t - h * 3600
s = h & ":"
h = Int(t / 60)
s = s & Format(h, "00") & ":"
t = t - h * 60
h = Int(t)
s = s & Format(h, "00") & "."
t = Int((t - h) * 100)
s = s & t
Label1.Caption = s

End Sub

Private Sub Command2_Click() '暂停和继续
PP = Not PP
Command2.Caption = IIf(PP, "继续", "暂停")
If Not PP Then tmr

End Sub

Private Sub Command3_Click()
SS = True
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False

End Sub追问还要求液晶数字的

来自:求助得到的回答

热心网友 时间:2023-11-08 04:55

把300改为5,省时间
Dim n1 As Integer
Dim n2 As Integer
Private Sub Command1_Click()
Timer1.Interval = 1000
n1 = 300
n1 = n1 - n2
n2 = n2 + 1
Label1.Caption = Str(n1)
If n1 = 0 Then
Timer1.Enabled = True
n1 = 300: n2 = 0
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 1000
n1 = 300
n2 = n2 + 1
n1 = n1 - n2
Label1.Caption = Str(n1)
If n1 = 0 Then
Call Command1_Click
End If
End Sub
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
为什么一些男性喜欢要求伴侣叫自己爸爸? proteus8中怎么放置引脚标号 ...在proteus里不知道用什么表示?有没有什么proteus中专门的中英文对照... 甜蜜家园郑毅铭是什么身份 甜蜜家园第二季郑毅铭喜欢谁 瑞梦喜智能空调床垫适合人群 小孩可以用智能床垫吗 智能床垫适合哪些人用 我父亲今年59岁,有高血压和颈椎病的病史,最近一段时间感觉一躺下就偏... ...刚从医院治疗回来。我想买个枕头给他,不知买怎样的比较好?_百度知 ... 有什么正规的外汇平台吗 怎样用vb编写多功能计时器 急用 群主用不了,如何更换群主? 就滑不动了,重启都按不了。Vivo手机? 奥迪Q5L显示屏上用电器空调有一个油壶还有一条绿色的是什么意思 奥迪q5l中控屏幕连不上车载 奥迪q5l中控大屏行驶中自动重启是怎么回事? 奥迪q5l中控可以改触摸屏吗 2021款q5l奥迪中控屏手印怎么处理 奥迪Q5l中控屏幕变暗 春笋这篇作文描写声音的词语有什么? 读完春笋这篇短文你认为春笋有哪些品质值得我们学习? 春笋短文是从哪些方面写的? 谁知道《春笋》的文章?大概内容是什么? 像春笋一样成长作文800字 描写春笋的好段 荣耀9可以用5v 2A的充电宝吗? 荣耀9用什么充电头好 不支持pd的雷电口插入电源要紧吗 梦见和朋友家人开车去钓鱼是什么意思?? 梦见杀鱼谁备上桌。梦很多亲戚。还有去世的父亲。 昆虫记食粪虫读后感? 怎么样用VB编写多功能计时器程序 设计一个具有时钟,秒表和倒计时功能的液晶显示式多功能计时器 你好,我想问一下你那有VB课程设计的多功能计时器的答案吗,要求有时钟,秒表和倒计时功能,还有最初的... 某公路圆曲线计算有个 sec 符号请问在多功能计时器上哪个键代替 昆虫记中食尸虫的特点? 能否用刚体转动实验仪和电脑多功能计时器测定不对称物体的转动惯量 花蛤沙蛛有毒吗 苹果4升级 没有越狱,想帮系统升上去 因为下游戏 更新程序都说 设备操作系统版本过低,不支持安装 我iphone3手机版本是4.2.1(8c148) 下游戏下不了,说是ios版本太低,我该怎么办? 怎么升级系统? ... 家里突然出现这种蜘蛛…这种是什么蜘蛛?有毒的莫?? 谁知道这是什么蜘蛛啊 这是什么蜘蛛 腹部上有一条横白纹 须也是白色的 非常爱跳,好像是跳蛛? 中国银行高新区支行周日上班么?急用,谢谢大家! 云服务内存满了,如何删除? 用友需要用语句来进行创建系统数据库表什么意思 失业金一个月交26元能拿多少钱 贵阳地区 现在失业金是多少 我十六年工龄,现失业,那么在贵阳市能领几个月的失业保险金?每个月有多少呢?谢谢! 贵阳失业保险金能领多少金额