Start of by creating a standard .exe project
now make one label and one timer
name them:
label: lblTime
timer: tmrTimer
now add
Option Explicit
to the code
now we need to use the form_load event to start the clock:
we do this by first adding the code:
Private Sub Form_Load()
End Sub
to the code and now we add the line lblTime.Caption = Time between them to sett the label to the local system time
but we also need to sett the interval of the timer
do this by adding the code:
tmrTimer.Interval = 1000
on the next line (still inside the form_load event)
now we need to ad a update event
add the code:
Private Sub tmrTimer_Timer()
End Sub
outside of the form_load event
now we can add code that will be executed then each time the timer reaches 0
add the code:
lblTime.Caption = Time
inside the tmrTimer_Timer event
now you got a basic digital clock
hope this sums it up
happy coding!!!
Ref:
Photoshop Tutorials and Flash Tutorials
Creating a Clock
Started by AfTriX, Jan 03 2007 11:53 PM
1 reply to this topic


Sign In
Create Account


Back to top









