'Timers are the backbone in any good application,'you will be able to decide when things will happen in millisecounds'by using timers and counters you gain controlPublicClass Form1
Inherits System.Windows.Forms.Form
'declare counter as integerDim counter AsIntegerPrivateSub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) HandlesMyBase.Load
Timer1.Enabled = False'disable timer at startupEndSubPrivateSub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True'starts the timer by enabling itEndSubPrivateSub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Enabled = False'stops the timer by disabling itEndSubPrivateSub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
counter = 0 'reset the counter
TextBox1.Text = 0
EndSub'The timer procedure'the timer procedure will loop in the intervall of the timer'I have set the timer interval in the "properties" menu to 1000 ms (1 sec)PrivateSub Timer1_Tick(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Timer1.Tick
counter = counter + 1 'we set the counter to count here
TextBox1.Text = counter 'write the counter value out as textEndSubEnd Class
Visual Basic .Net Source Code
I hope you found this VB .Net tutorial useful!
Don't forget to mention Apron Tutorials in your References!