I'm creating a clock for circuit training that will countdown from 30 to 0 then an interval countdown from 15 to 0.
I'll then repeat the process and finally a 3rd 30 sec countdown.
The next part will countdown from 60 secs to 0 and then an interval from 30 to 0.
That will complete one station and I will repeat the entire process 10 times.
The programming part is fine and I can add the "bells and whistles" later.
However I am having problems and getting a "Not Responding" error after approx 5 seconds - This dissappears when the end of the program is reached and both counters are at correct at the end, but how do I prevent the not responding.
CODE
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)
CODE
Public Sub RunCircuit()
Dim CIRCUIT_TIME As Integer
Dim INTERVAL_TIME As Integer
Dim MyCounter As Integer
CIRCUIT_TIME = 30
INTERVAL_TIME = 15
For MyCounter = 1 To 30
Me.Label1.Text = CIRCUIT_TIME
Me.Label1.Refresh()
Sleep(1000)
CIRCUIT_TIME = CIRCUIT_TIME - 1
Next MyCounter
For MyCounter = 1 To 15
If Me.Label2.Text = "10" Then Me.Label2.ForeColor = Color.Orange
If Me.Label2.Text = "5" Then Me.Label2.ForeColor = Color.Red
Me.Label2.Text = INTERVAL_TIME
Me.Label2.Refresh()
Sleep(1000)
INTERVAL_TIME = INTERVAL_TIME - 1
Next MyCounter
End Sub
Thank you