[fpc-pascal] Windows console

Marcos Douglas md at delfire.net
Tue Sep 6 14:23:15 CEST 2016


On Tue, Sep 6, 2016 at 6:44 AM, Santiago A. <svaa at ciberpiula.net> wrote:
> I have found a solution here:
>
> http://stackoverflow.com/questions/20134421/can-a-windows-gui-program-written-in-lazarus-create-a-console-and-write-to-it-at
>
> At least it works for windows
>
> uses
>   Windows;
> begin
>   AllocConsole;      // in Windows unit
>   IsConsole := True; // in System unit
>   SysInitStdIO;      // in System unit
>   // Now you can do Writeln, DebugLn, ...
> end.

This is very useful to show whats going on in a Windows application
when is processing in background, thanks.

Regards,
Marcos Douglas



More information about the fpc-pascal mailing list