Method executing at specific (clock) time
-
:confused:I need some help... I have a method that I want to execute at a specific time. For example, every 3PM it will execute this method. Any suggestions or help on this. I don't think it would be that difficult... I was thinking I could just capture the system time, on form load. Then while (system time == 3PM) execute method. Not sure if that would work Let me know asap! Thanks guys
-
:confused:I need some help... I have a method that I want to execute at a specific time. For example, every 3PM it will execute this method. Any suggestions or help on this. I don't think it would be that difficult... I was thinking I could just capture the system time, on form load. Then while (system time == 3PM) execute method. Not sure if that would work Let me know asap! Thanks guys
-
yeah - i'm kind of figuring out how that works. I created an action for the timer tick below:
private void tmrClock_Tick(object sender, EventArgs e) { if( sender == tmrClock ) { //perform method ? Invalidate(); }
On Form load, I have the timer interval set to a few thousand milliseconds. Then I start the timer. This is all I have so far. I'm guessing my method goes in the tmrClock_Tick? Is that right? -
yeah - i'm kind of figuring out how that works. I created an action for the timer tick below:
private void tmrClock_Tick(object sender, EventArgs e) { if( sender == tmrClock ) { //perform method ? Invalidate(); }
On Form load, I have the timer interval set to a few thousand milliseconds. Then I start the timer. This is all I have so far. I'm guessing my method goes in the tmrClock_Tick? Is that right?javamdk wrote:
I'm guessing my method goes in the tmrClock_Tick?
Correct. This method is called when the timer fires.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )