level 1
我写了
Private Sub Command2_Click()
If Timer2.Enabled = True Then
Timer2.Enabled = False
Timer2.Interval = 0
End If
If Timer2.Enabled = False Then
Timer2.Enabled = True
Timer2.Interval = 1000
End If
End Sub
但是点了一次之后没有暂停,想问是哪里出了问题,感谢
2016年05月22日 12点05分
1
level 3
不要写两点循环嵌套,两个都执行的。你再想下,第一个循环本来应该是让它停的,下一个又让它启动了
2017年01月08日 15点01分
5
level 4
Private Sub Command1_Click()
Timer1.Enabled = Not Timer1.Enabled
If Command1.Caption = "暂停" Then
Command1.Caption = "继续"
ElseIf Command1.Caption = "继续" Then
Command1.Caption = "暂停"
End If
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
End Sub
2017年03月12日 01点03分
6
level 1
if timer2.enable then 'timer2.enable=true
timer2.enable=false
else
timer2.enable=true
end if
2018年09月07日 13点09分
8