One of the things you must be careful with is reentrancy in your application through a message loop. The most obvious way is Application.ProcessMessages: it will loop until all messages from the Windows message queue are processed, weather your application is ready for them or not. A less obvious ...
More...