من سه عدد Label به عنوان چراغ ها استفاده کرده ام چگونه به تایمر تعریف کنم که این کار پشت سر هم تکرار شود .
یعنی روشن خاموش شدن چراغ ها .
با تشکر
Private Sub Timer5_Timer()
Static a As Long
a = a + 1
If a = 3 Then Label1.BackColor = vbRed
If a = 110 Then Label1.BackColor = &H8000000F
If a = 110 Then Timer5.Enabled = False
If Timer5.Enabled = False Then Timer6.Enabled = True
End Sub
Private Sub Timer6_Timer()
Static b As Long
b = b + 1
If b = 1 Then Label2.BackColor = &HFFFF&
If b = 20 Then Label2.BackColor = &H8000000F
If b = 20 Then Timer6.Enabled = False
If Timer6.Enabled = False Then Timer7.Enabled = True
End Sub
Private Sub Timer7_Timer()
Static b As Long
c = c + 1
If c = 1 Then Label3.BackColor = vbGreen
If c = 100 Then Label3.BackColor = &H8000000F
If c = 100 Then Timer7.Enabled = False
End Sub
دوستان این کد تا حالا درست است .