Do Until txt2Sec.Text = 0 And txt2Min.Text = 0 And txt2Hour.Text = 0
Label10.Visible = True
Loop
Timer1.Enabled = True
End Sub
This freezes my computer.
these are the code to the timers.
Quote originally posted by Timer2 ...
Private Sub Timer2_Timer()
If txt2Sec.Text = 0 And txt2Min.Text = 0 And txt2Hour.Text = 0 Then
Timer1.Enabled = False
ElseIf txt2Sec.Text > 0 Then
txt2Sec.Text = txt2Sec.Text - 1
Else 'if zero
txt2Sec.Text = 59
If txt2Min.Text > 0 Then 'update mins
txt2Min.Text = txt2Min.Text - 1
Else
'check if Hour is 0, and if it is, then stop timer, else continue
txt2Min.Text = 59
If txt2Hour.Text > 0 Then 'update mins
txt2Hour.Text = txt2Hour.Text - 1
Else
'check if Hour is 0, and if it is, then stop timer, else continue
txt2Hour.Text = 0
End If
End If
End If
End Sub
Quote originally posted by Timer1 ...
Private Sub Timer1_Timer()
If txtSec.Text = 0 And txtMin.Text = 0 And txtHour.Text = 0 Then
Timer1.Enabled = False
ElseIf txtSec.Text > 0 Then
txtSec.Text = txtSec.Text - 1
Else 'if zero
txtSec.Text = 59
If txtMin.Text > 0 Then 'update mins
txtMin.Text = txtMin.Text - 1
Else
'check if Hour is 0, and if it is, then stop timer, else continue
txtMin.Text = 59
If txtHour.Text > 0 Then 'update mins
txtHour.Text = txtHour.Text - 1
Else
'check if Hour is 0, and if it is, then stop timer, else continue
txtHour.Text = 0
End If
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline:Please Help Me