AIM:To create a stopwatch
CODE
Form 1
Dim starttime
Private Sub cmdstart_Click()
starttime = Now
Timer1.Enabled = True
End Sub
Private Sub cmdstop_Click()
Timer1.Enabled = False
End Sub
Private Sub display_Click()
starttime = Now
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub Form_Load()
display.BackColor = RGB(0, 255, 255)
display.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Timer1_Timer()
display.Caption = Format$(Now - starttime, "hh : mm : ss")
End Sub
O/P
0 comments:
Post a Comment