[Lazarus] animated splash screen for lengthy operation, works with windows, doesn't with linux

Jean SUZINEAU jean.suzineau at wanadoo.fr
Mon Mar 27 10:13:19 CEST 2023


Le 27/03/2023 à 09:46, Luca Olivetti via lazarus a écrit :
> procedure TUpdateThread.Execute;
> begin
>   while not Terminated do
>   begin
>     FWaitForm.ShowProgress;
>     Sleep(30);
>   end;
> end;

Usually I use TThread.Synchronize to ensure that the graphic code is run 
by the main thread.

But it won't work if your main thread is blocking.

May be you should do the inverse move the lengthy operation to a 
separate thread and keep the main thread for the splash screen ?

As far as I know the graphic code must be run by the main thread.



More information about the lazarus mailing list