Question Clock

glw1988

New member
Joined
Apr 21, 2010
Messages
4
Programming Experience
1-3
I am currently creating a clock like the "24" clock, i have made the numbers using the drawing tools within Visual Basic, i was just wondering how i can link the current time to corrospond with the shapes i have drawn?

thank you
 
I would do something like:

Start a timer.

In the timer tick event, split the system derived time (into individual numbers) in whatever format you would like, then using each number, select the corresponding picture using a function that takes a number and returns the picture.

I'm guessing the rest would be a matter of getting the numbers to show, then disappear on the next tick etc...
 
Since were needing accuracy I recommend the System.Timers.Timer. The Windows.Forms.Timer can easily get bogged down and be inaccurate. You will be using the Elapsed event which comes from a separate thread so you will need a delegate or just set the Timer.SynchronizingObject = Me.
 
Since were needing accuracy I recommend the System.Timers.Timer. The Windows.Forms.Timer can easily get bogged down and be inaccurate. You will be using the Elapsed event which comes from a separate thread so you will need a delegate or just set the Timer.SynchronizingObject = Me.
How is a Forms.Timer different to a form synchronized Timers.Timer would you think? None.
And how is this "inaccuracy" in any way a concern regarding what the current time is? None.
 
Back
Top