Adding a clock to a form

  • Thread starter Thread starter pregis
  • Start date Start date
P

pregis

Hi... I am trying to add an analog clock to a form so that it continuously
updates the time and displays the current date. I can't seem to get it to
update though without looping it and I was hoping it would work without
restricting the user from navigating or using any of its (the forms)
functionality. Can you help?
 
pregis said:
Hi... I am trying to add an analog clock to a form so that it continuously
updates the time and displays the current date. I can't seem to get it to
update though without looping it and I was hoping it would work without
restricting the user from navigating or using any of its (the forms)
functionality. Can you help?

Put a Timer (System.Windows.Forms.Timer) on the Form (from the Toolbox),
set Interval=100. In it's Tick (or Elapsed?) event handler, update the
clock.


Armin
 
Hi... I am trying to add an analog clock to a form so that it continuously
updates the time and displays the current date.  I can't seem to get itto
update though without looping it and I was hoping it would work without
restricting the user from navigating or using any of its (the forms)
functionality.  Can you help?

I would recommend using a System.Windows.Forms.Timer.

Curious, how do you "draw" the analog clock and move the hands?
 
Back
Top