P
Peter Webb
I have this animation thing with balls bouncing around. I want to be able to
turn it on and off with button clicks. Trouble is, it doesn't update my form
with the button presses until my animation finishes. This is despite me even
having a thread.sleep(1000) in the main loop which I would expect to let
other processes in.
Is there some way I can force the system to process events either for the UI
as a whole or on a control-by-control basis, so I can check if a Stop button
has been pressed?
I am of course aware that if I (for example) delete objects in the main
thread within my Stop button click handler, all hell could break loose at
runtime, but I promise to use this power wisely.
turn it on and off with button clicks. Trouble is, it doesn't update my form
with the button presses until my animation finishes. This is despite me even
having a thread.sleep(1000) in the main loop which I would expect to let
other processes in.
Is there some way I can force the system to process events either for the UI
as a whole or on a control-by-control basis, so I can check if a Stop button
has been pressed?
I am of course aware that if I (for example) delete objects in the main
thread within my Stop button click handler, all hell could break loose at
runtime, but I promise to use this power wisely.