Do I really need AddEventHandler ? lazarus / 8-Other ---------------------------------------------------------------------- horned1 · 2009-04-17 09:37 Hi, I am programming a larger program, using a button that starts a quite time consuming procedure. I'd like to add a simple 'cancel' button that stops the procedure, but of course I cannot click the button while the procedure is running. A quick search on the wiki told me about hooks and the AddEventHandler possibility, but it seems to be way to complex for my simple needs. Is there a simpler way to make procedure number 1 listen for a button being pressed and if it does -> do x .. /thomas ---------------------------------------------------------------------- theo · 2009-04-17 12:38 Application.ProcessMessages http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial# Do_you_need_multithreading.3F