Showing posts with label stop watch in vb 6. Show all posts
Showing posts with label stop watch in vb 6. Show all posts

Saturday, October 4, 2014

Stop Watch in Visual Basic 6


A simple stop watch application that I wrote using Microsoft Visual Basic 6. The code uses timer control to generate time in seconds in Visual Basic 6. The code is very short and easy to understand for beginners that are new in Visual Basic programming.

If you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com

Thank you very much.



Sample Output of Our Program


Program Listing

Private Sub cmdstart_Click()
    lbltime.Caption = "0"
    tmrwatch.Enabled = True
End Sub

Private Sub cmdstop_Click()
    tmrwatch.Enabled = False
End Sub

Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Form_Load()
    tmrwatch.Interval = 100
End Sub

Private Sub tmrwatch_Timer()
    lbltime.Caption = Str(Val(lbltime.Caption + 0.1))
End Sub

DOWNLOAD SOURCE CODE HERE