nrothwelluk
02-12-04, 10:33 AM
This is stopwatch i am doing for my project!!!
I need help" would ne one be able too finish off it !!! or help me too put in get tick count, dont know how too put it in too the program
The program is surrpose too be a simple stopwatch that when stoped the time should keep going and should display the time when stoped in a lable box
would be very greatfull if someone would help
Dim sec As Single, min As Single, hour As Single, milli As Single
Private Sub cmdEnd_click()
End
End Sub
Private Sub cmdStart_click()
Tmrwatch.Interval = 10
End Sub
Private Sub cmdStop_Click()
Tmrwatch.Enabled = True
lbltime2.Caption = lbltime
End Sub
Private Sub Tmrwatch_Timer()
milli = milli + 1
If milli >= 100 Then sec = sec + 1: milli = 0
If sec >= 60 Then min = min + 1: sec = 0
If min = 60 Then hour = hour + 1: min = 0
lbltime.Caption = Format(Str(hour), "00") & ":" & _
Format(Str(min), "00") & ":" & _
Format(Str(sec), "00") & ":" & _
Format(Str(milli), "00")
End Sub
Private Sub cmdReset_Click()
lbltime.Caption = "00.00.00.00" 'reset watch
lbltime2.Caption = "00.00.00.00"
sec = 0
min = 0
hour = 0
milli = 0
Tmrwatch.Enabled = True
End Sub
I need help" would ne one be able too finish off it !!! or help me too put in get tick count, dont know how too put it in too the program
The program is surrpose too be a simple stopwatch that when stoped the time should keep going and should display the time when stoped in a lable box
would be very greatfull if someone would help
Dim sec As Single, min As Single, hour As Single, milli As Single
Private Sub cmdEnd_click()
End
End Sub
Private Sub cmdStart_click()
Tmrwatch.Interval = 10
End Sub
Private Sub cmdStop_Click()
Tmrwatch.Enabled = True
lbltime2.Caption = lbltime
End Sub
Private Sub Tmrwatch_Timer()
milli = milli + 1
If milli >= 100 Then sec = sec + 1: milli = 0
If sec >= 60 Then min = min + 1: sec = 0
If min = 60 Then hour = hour + 1: min = 0
lbltime.Caption = Format(Str(hour), "00") & ":" & _
Format(Str(min), "00") & ":" & _
Format(Str(sec), "00") & ":" & _
Format(Str(milli), "00")
End Sub
Private Sub cmdReset_Click()
lbltime.Caption = "00.00.00.00" 'reset watch
lbltime2.Caption = "00.00.00.00"
sec = 0
min = 0
hour = 0
milli = 0
Tmrwatch.Enabled = True
End Sub