[fpc-pascal] Re: Help!!

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jan 17 16:24:20 CET 2012


Andreas Schneider <aksdb at gmx.de> hat am 17. Januar 2012 um 16:08
geschrieben:

> On Tuesday, January 17, 2012, at 13:15 Felipe Monteiro de Carvalho wrote:
> > If the use case is closing the main form without quitting the
> > application, then I would prefer a property
> > TApplication.QuitApplicationWhenMainFormCloses or something like that.
>
>
> My current use case is:
> - show a login form

> - when login succeeds, show a progress form (connection  initialization)
and close login

> - on failure: go back to login
> - on success: show the actual application form and close the login form


Instead of Application.CreateForm create the form directly. For example:

LoginForm:=TLoginForm.Create(nil);
while LoginForm.ShowModal<>mrOk do ;
LoginForm.Free;
...
Application.CreateForm(Form1);



>
> Showing the "main" form always wouldn't seem nice. Starting the
application with the
> mainform hidden doesn't work afaik. You can hide it manually AFTER it was
shown (.Hide),
> but Visible=False is ignored on startup. This just doesn't look nice if
the main form
> pops up for a second to be hidden again. So I use the workflow described
above, which
> changes the current Application.MainForm several times.



Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120117/58bcca68/attachment.html>


More information about the fpc-pascal mailing list