[Lazarus] What to replace Application.Processmessages with?
mailinglists at geldenhuys.co.uk
Tue Oct 27 22:25:55 CET 2020
On 13/10/2020 9:15 am, Bo Berglund via lazarus wrote:
> The TTimer objects have been replaced by TFpTimer objects in the
> ported code and this seems to work fine, whereas TTimer does not.
That is the key part, using TFPTimer is thread based, so calling
CheckSynchronized() would be the solution to keep things ticking
Michael made a good suggestion, by wrapping that code into a method,
so it is easier to maintain, and that wrapper method is more
descriptive (ie: self documenting your code).
In the long term I would highly suggest converting that code / tasks
to multiple theads. From what you described, they sound like good
candidates for a thread based system.
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
My public PGP key: http://tinyurl.com/graeme-pgp
More information about the lazarus