Yahoo... > I guess, when u send freeAndNill the instances of the menu has been released > and nil, so it cant receive Click event you send. Perhaps moving FreeAndNill > to other function will solve this problem. Just create function to release > the menu instance and call the function when finished working with menu (its > including menu events).
yes,I agree, but this won't help me as much as a call to Application.ProcessMessages will, as I need to process the variable _after_ the call to the procedure, not test it somewhere else later. I'll also try to initialize some stuff in the unit's startup section. I guess there is no solution out of the one I'm currently adopting, or perhaps with some semaphore/mutex, in order not to have the function terminate as the Menu.Popup(x,y) returns... Cheers, A.