FMX.Forms.TApplication.ProcessMessages
Delphi
procedure ProcessMessages;
C++
void __fastcall ProcessMessages();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Forms.pas FMX.Forms.hpp |
FMX.Forms | TApplication |
Description
Interrupts the execution of a FireMonkey application so that it can process the message queue.
Call ProcessMessages to permit the FireMonkey application to process messages that are currently in the message queue. ProcessMessages cycles the message loop until it is empty, and then returns the control to the application.
- Tip: Neglecting message processing affects only the application calling ProcessMessages, not other running applications. In lengthy operations, calling ProcessMessages periodically allows the application to respond to paint and other messages.
- Tip: ProcessMessages does not allow the application to go idle, whereas HandleMessage does.
- Note: Starting with RAD Studio 10.2 Tokyo Release 2, using the ProcessMessages procedure to hold the main thread execution in a cycle when developing for Android, can cause the application to freeze.