03-11-2009 10:31 AM
I want to stop the execution of my program until an event occurs. So I created a while cicle in which the program controls this event and when the event occurs the condition to exit the cicle is satisfied. But in this way the user interface is completely blocked during the while cicle. Now I need to plot some graph and keep active the interface to permit to the users to cancel the operations in progress. How I can tell the program to wait until the event occur without blocking the User Iterface?
Thank You
03-11-2009 12:24 PM
Somewhere inside your while () loop, insert the following line:
ProcessSystemEvents ();
This will ensure that the user interface stays alive. (If I have a very fast loop, I modify this arrangement slightly so that I only call the function as often as I want the user interface to be updated - say every 100-200ms.)
JR
03-23-2009 07:42 PM