Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkeyWindows

Post And Handle Internal Messages With Delphi XE5 Firemonkey On Android And Windows

Delphi XE5 Firemonkey Messaging SystemFrançois Piette has a code snippet up where he shows how to build an object messaging system for Windows and Android in Delphi XE5 Firemonkey. The code demonstrates creating a TMessagingSystem object which implements and handles a message system or queue. A messaging system allows one part of your app to talk to other parts of your app asynchronously. You can have a thread where you use a PostMessage() function to asynchronously send messages to your main app and then read and handle the messages out of the queue. Both implementations (the Windows and Android versions) use native APIs on their respective platforms to accomplish the task. The sample code also has demo code which shows a clear example of how to use the messaging system with threads to get a job done. If you’re use to using messages on Windows to get a job done or you just want to architect your app to be more asynchronous then take a look at this and try out the messaging system for Android.

Head over and check out the source code for posting and handling messages on Windows and Android.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
DelphiDemoFiremonkeyLibraryShowcaseWindows

Run Large Language Models Natively In Object Pascal

Code SnippetDelphiDemoLibraryShowcaseWindows

Windows CLI To Download, Manage, And Chat With Local AI Models

DelphiDemoOSXWindows

Download, Run, And Chat With Local LLMs On Windows And macOS

Code SnippetDelphiDemoWindows

Build Local Vector Search And RAG Applications In Delphi

Sign up for our Newsletter and
stay informed
[mailpoet_form id="1"]

Leave a Reply