Andreas Schneider <ak...@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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to