展开全部
一个text1,两个按钮。代码如下,AA是公共变量。
Dim aa As Date
Private Sub Command1_Click()
aa = Timer
Timer1.Interval = 10
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Text1.Text = Format(Timer - aa, "0.00")
End Sub
Dim aa As Date
Private Sub Command1_Click()
aa = Timer
Timer1.Interval = 10
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Text1.Text = Format(Timer - aa, "0.00")
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询