Adding a clock to a form

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?
 
A

Armin Zingler

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
 
J

Joe Cool

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Windows Clock 5
invalid time - clock adjusted forward 19
Simple clock on a aspx page? 5
Access Main form/Subform Navigation 0
taskbar clock 7
Time Clock 6
making VB do something outside the computer 6
Clock 3

Top