What is the best way to update FMX control without using Apllication.Processmessages method, וn main form.
Apllication.Processmessages call can cause to unwanted asynchrony user events to come in before operation completed.
We have old delphi XE5 in ms windows 10, i tried repaint and invalidate but it not help.
Have the
OnClickhandler disable the button, start a background thread/task to do the actual work, show the "please wait" message, and then exit theOnClickhandler. Do not block the main thread at all. Let it run so it can process UI work normally as needed.When your background work is finished, have the thread/task notify the main thread, which can then dismiss the "please wait" message and re-enable the button.
DO NOT do the actual work in the
OnClickhandler itself, and DO NOT callApplication.ProcessMessages()at all.