我的这个vb程序怎么错了?
来源:百度知道 编辑:UC知道 时间:2024/06/20 12:21:32
有一个 commamd label timer 当倒计时停止到0时,我继续点command时候,我希望它重新从60开始倒计时,为什么我的程序不行?
Dim s, t
Private Sub Command1_Click()
Timer1.Enabled = True
Command1.Enabled = False
Command1.Visible = False
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Timer1_Timer()
s = s + 1
t = 60 - s
Label1.Caption = t
If t = 0 Then
Command1.Visible = True
Timer1.Enabled = False
Command1.Enabled = True
Command1.Caption = "¼ÌÐø"
End If
End Sub
Dim s, t
Private Sub Command1_Click()
Timer1.Enabled = True
Command1.Enabled = False
Command1.Visible = False
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Timer1_Timer()
s = s + 1
t = 60 - s
Label1.Caption = t
If t = 0 Then
Command1.Visible = True
Timer1.Enabled = False
Command1.Enabled = True
Command1.Caption = "¼ÌÐø"
End If
End Sub
Dim s, t
Private Sub Command1_Click()
s = 0
Timer1.Enabled = True
Command1.Enabled = False
Command1.Visible = False
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Timer1_Timer()
s = s + 1
t = 60 - s
Label1.Caption = t
If t = 0 Then
Command1.Visible = True
Timer1.Enabled = False
Command1.Enabled = True
Command1.Caption = "?ìD?"
End If
End Sub
Private Sub Command1_Click()
s=0
t=0
Timer1.Enabled = True
Command1.Enabled = False
Command1.Visible = False
End Sub
在按扭事件中加上初始化数值
成吉思汗