Sub Start_Click
H = H.Text
M = M.Text
S = S.Text
HMS.Visible=True
Timer1.Enabled = True
Timer1.Interval = 1000
Timer2.Interval = 30000 '30 seconds
Timer2.Enabled = True
If IsNumber(H)=True AND IsNumber(M)=True AND IsNumber(S)=True Then
x=Now
StartTime = TimeAdd(x, H, M, S)
Diff = (StartTime-x)/cTicksPerSecond
Start.Visible = False
Pause.Visible = True
Else
Message_Box
Timer1.Enabled=False
Timer2.Enabled=False
Display.Text=""
M.Focus
Start.Visible = True
Pause.Visible = False
End If
If H=0 AND M=0 AND S=0 Then
Message_Box
Timer1.Enabled=False
Timer2.Enabled=False
'Display.Text=""
H.Focus
Start.Visible = True
Pause.Visible = False
TH=0
TS=0
TM=0
End If
End Sub
Sub Timer1_Tick
Diff=Diff-1
If Diff = 0 Then
Timer1.Enabled = False
Timer2.Enabled = False
Start.Visible = True
Pause.Visible = False
Sound("untie.wav")
End If
Display.Text=Diff
If H=0 AND M=0 AND S=0 Then
Reset_Click
Else
TM=TimeMinute(Diff*cTicksPerSecond)
TH=TimeHour(Diff*cTicksPerSecond)
TS=TimeSecond(Diff*cTicksPerSecond)
End If
HMS.Text = "Hrs: " & TH & " Mins: " & TM & " Secs: " & TS
End Sub