Main Page | Report this Page
.NET DotNet Forum Index  »  Visual C# Forum  »  What is desired method vs timer for running continuous...
Page 1 of 1    

What is desired method vs timer for running continuous...

Author Message
Rich P...
Posted: Mon Oct 26, 2009 4:33 pm
Guest
I created a simple custom usercontrol that displays current time and
changes the color of a label control every second. I added a timer
control to my custom control and then added this to a winform app for
testing and for release. It works fine, but I think there is a more
desired way to run a custom control like this than using a timer.

My question is this - Is there is a better/more desired way to run a
clock in a user control than using a timer control? I am thinking like
tapping into the OS for the system clock or tapping into the network
server - I think I saw a sample like that but was not able to get it to
run.

Note: this project is mainly a training project for me.

Thanks in advance for any suggestions or sample code.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 
Rich P...
Posted: Tue Oct 27, 2009 9:28 am
Guest
Thanks for your reply. Yes, I am referring to the Timer control in the
VS toolbox (the thing that is shaped like an alarm clock). I think,
more specifically, I was concerned about the cross threading that you
mention in your reply. I have read articles referencing threading.timer
and system.Timer, and just wanted to sort this all out.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 
Jeff Johnson...
Posted: Wed Oct 28, 2009 12:25 pm
Guest
"Rich P" <rpng123 at (no spam) aol.com> wrote in message
news:%23yIngoxVKHA.1280 at (no spam) TK2MSFTNGP04.phx.gbl...

Quote:
Yes, I am referring to the Timer control in the
VS toolbox (the thing that is shaped like an alarm clock).

I mention this merely for the sake of mentioning this: I think it's really
supposed to look like a stopwatch.
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Nov 29, 2009 5:09 am