[Lazarus] What is main form? (Splash question)
Vojtěch Čihák
vojtech.cihak at atlas.cz
Fri May 8 21:37:32 CEST 2015
Thanks.
FrmSplash:=TFrmSplash.Create; instead of Application.CreateForm(); does the job.
It is also what Lazarus does in lazarus.pp.
The reference code from Giuliano works well, especially Application.ProcessMessages; is necessary.
FrmSplash.Update can be omitted.
Problem solved.
______________________________________________________________
> Od: Giuliano Colla <giuliano.colla at fastwebnet.it>
> Komu: Lazarus mailing list <lazarus at lists.lazarus.freepascal.org>
> Datum: 08.05.2015 20:13
> Předmět: Re: [Lazarus] What is main form? (Splash question)
>
Il 08/05/2015 17:46, Vojtěch Čihák ha scritto:
> Is it bug? Or do I something wrong?
The following code (where form2 is the splash screen) works fine under
Lazarus
> RequireDerivedFormResource := True;
> Application.Initialize;
> Form2 := TForm2.Create(Nil);
> Form2.Show;
> Form2.Update;
> Application.ProcessMessages;
> Sleep(3000);
> Application.CreateForm(TForm1, Form1);
> Form2.Hide;
> Form2.Free;
> Application.Run;
You may use as a guideline for your purposes
Giuliano
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150508/fbaffaec/attachment-0003.html>
More information about the Lazarus
mailing list