On 21/06/17 22:45, Bo Berglund wrote:
Two issues here:1) How do I enter a loop in a GUI application? In a command lineapplication it is just going to be part of he main program code.
I'm not saying it's the right or the best way, but in the interest of giving you something to work with I do this:
procedure TListForm.FormCreate(Sender: TObject); CONST startParam= 0; begin .. Application.QueueAsyncCall(@OnAfterShow, startParam) (* Keep at end *) end { TListForm.FormCreate } ; PROCEDURE TListForm.OnAfterShow(afterShowParam: PtrInt); (* guaranteed to be after all form creation etc. has completed. *) BEGIN .. END { TListForm.OnAfterShow } ; That can loop, but make sure you put Application.ProcessMessages in it. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal