请问下 VB怎么实现分次倒计时 就如同红绿灯那样 先倒计时60秒 再倒计时...
发布网友
发布时间:2024-04-02 16:17
我来回答
共1个回答
热心网友
时间:2024-04-08 14:07
Public a As Integer, b As Integer, c As Integer, step As Integer, n As Integer
Private Sub Form_Load()
step = 0
a = 60
b = 5
c = 55
n = 0
End Sub
Private Sub Timer1_Timer()
If n = 0 Then
Select Case step
Case 1
n = b
step = 2
Case 2
n = c
step = 3
Case Else
n = a
step = 1
End Select
End If
Text1.Text = n
n = n - 1
End Sub