[Lazarus] What to replace Application.Processmessages with?

Bo Berglund bo.berglund at gmail.com
Sun Nov 1 11:48:54 CET 2020

On Sun, 1 Nov 2020 10:20:11 +0100 (CET), Michael Van Canneyt via
lazarus <lazarus at lists.lazarus-ide.org> wrote:

>> Is there a way in code to check if Forms is used?
>> So it can be used instead of {$IFDEF NOGUI}
>{$IF DECLARED(Forms)}
>should do the trick for you.

I created this command line program:

program Test;

  Writeln('I will test the TForm check now:');
    Writeln('TForm is declared...');
    Writeln('Apparently TForm not declared');
  Writeln('I will test the Forms check now:');
  {$IF DECLARED(Forms)}
    Writeln('Forms is declared...');
    Writeln('Apparently Forms not declared');


When I run it in a console:

$ ./Test
I will test the TForm check now:
Apparently TForm not declared
I will test the Forms check now:
Apparently Forms not declared

However in the Lazarus code editor the lines inside the {$ELSE}
clauses are shown as disabled even though these are the ones actually
present and running in the build...

Bo Berglund
Developer in Sweden

More information about the lazarus mailing list