..
A stopwatch is a tool that ... oh well, I do not think it is appropriate to explain what a stopwatch rather should understand how to make a Visual Basic 6.
The functions are very simple: a Start button that will stop the stopwatch will be started soon, counting the seconds from the time meanwhile.
Clicking the button again while its caption is Stop, the clock will reset itself and stop.
We create a new EXE in our copy of VB6 and create a form, adding a label, a command and a timer:

We double-click the timer and add the following code:
Private Sub tempo_Timer ()
conta.Caption conta.Caption + 1 =
End Sub
Just go to increase the value of the label of a unit.
The more complex the code be applied to the button:
Private Sub comando_Click ()
If comando.Caption = "Start" Then
tempo.Enabled = True
comando.Caption = "Stop"
Call tempo_Timer
tempo.Interval = 1000
Else
tempo.Enabled = False
comando.Caption = "Start"
tempo.Interval = 0
conta.Caption = 0
End If
End Sub
We check first that his is capition Start, in which case we go, in order:

| |
MS Access (Advanced)
Learn how to create and manage databases quickly and easily. Starting from 29 €. |
| |
Visual Basic 6 (Course)
Make Desktop Applications with VB6. From 39 €. |