How to write a procedure that can be stopped

I'd like to know how to write a procedure, which can be stopped be a button click.
The idle function does not seem a good solution.
I was thinking about checking within this function whether a certain variable (modified with a button click) was altered. For this however the program has to take care of other events. What are the functions I should call from within the procedure to check whether there are some events waiting and to allow the main program to take care of it.
Plese help.
Best regards,
Zbigniew Galias

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]