Here is an example, modify it to get it to work the way you want it.
Add a Label control and a Timer control to your form. Name the label "lblTime" and name the timer "tmr". Set the timer's Interval property to 1000. This is the number of milliseconds that will pass before the tick event is fired (1000 ms = 1 second). Also set the timer's Enabled property to True.
Double-click the timer control to bring up it's Tick event. Your tick event should look something like this:
-----------------------------------------------------------------
Private Sub tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmr.Tick
Dim dt As DateTime = DateTime.Now
lblTime.Text = dt.ToLongTimeString
End Sub
-----------------------------------------------------------------
See if this helps you out.
J
|