Hi all.
I was wondering if someone could enlighten me regarding the function of timers on a windows form.
Assuming we have a timer's interval set for let's say 5 seconds and some code in the click event that gets executed which may take some microseconds.
Does the the program just wait until the next click event of the timer before returning control to the calling routine?
If that was so, would we would need to include a DoEvents so that other windows processes can execute while our program waits?
But if we included a DoEvents, would our calling routine continue to execute without waiting for the timer to 'return'?
I'm asking the questions to improve my understanding of timers in VB.
What I would like then to do is use 2 timers in a windows form application.
Something like the following:
timer1 would execute the code in its click event, and when it's interval is over, timer2 would execute the code in it's click event, at which time timer1 would begin again.
This would continue until another event like a button click which would disable the timers.
What would be the best way to accomplish this?
Thank you in advance
--Celtic
I was wondering if someone could enlighten me regarding the function of timers on a windows form.
Assuming we have a timer's interval set for let's say 5 seconds and some code in the click event that gets executed which may take some microseconds.
Does the the program just wait until the next click event of the timer before returning control to the calling routine?
If that was so, would we would need to include a DoEvents so that other windows processes can execute while our program waits?
But if we included a DoEvents, would our calling routine continue to execute without waiting for the timer to 'return'?
I'm asking the questions to improve my understanding of timers in VB.
What I would like then to do is use 2 timers in a windows form application.
Something like the following:
timer1 would execute the code in its click event, and when it's interval is over, timer2 would execute the code in it's click event, at which time timer1 would begin again.
This would continue until another event like a button click which would disable the timers.
What would be the best way to accomplish this?
Thank you in advance
--Celtic