Question about timer
Please,
I have read other timer related question but i could not find an answer for what is happening for me.
I have a class (in a library) that set a timer for a panel animation, moving the panel, when the panel is in the proper place it stops the timer, and it is working perfect.
Many subs call can happen meanwhile, and depends where the code goes there is a situation that the programs needs to do another panel animation.
For that, now, I am entering in a while doevents loop in a hope that the first animation stops and I can start the second.
The problem is that seems that the Timer is ticking anymore, i was expecting the tick event happen whatever the program could be doing. If i remove this need of waiting the timer ticks and the animation happens.
I know it will be suggested to make an event, when the first finish call when the animation is done giving a chance for the second start.
But in this case this is not possible, the code is far away in a context that it should not even care about that.
However, my question is: does timer depend on a loop event of something like that? Since it seems to stopping.
Just came a thought, could be the screen refresh? The timer executed and the views did not get the time for refresh it self, if based on a message loop?
Please, any hint?
Regards
Eduardo Elias
Please,
I have read other timer related question but i could not find an answer for what is happening for me.
I have a class (in a library) that set a timer for a panel animation, moving the panel, when the panel is in the proper place it stops the timer, and it is working perfect.
Many subs call can happen meanwhile, and depends where the code goes there is a situation that the programs needs to do another panel animation.
For that, now, I am entering in a while doevents loop in a hope that the first animation stops and I can start the second.
The problem is that seems that the Timer is ticking anymore, i was expecting the tick event happen whatever the program could be doing. If i remove this need of waiting the timer ticks and the animation happens.
I know it will be suggested to make an event, when the first finish call when the animation is done giving a chance for the second start.
But in this case this is not possible, the code is far away in a context that it should not even care about that.
However, my question is: does timer depend on a loop event of something like that? Since it seems to stopping.
Just came a thought, could be the screen refresh? The timer executed and the views did not get the time for refresh it self, if based on a message loop?
Please, any hint?
Regards
Eduardo Elias
Last edited: