Form not minimizing properly [duplicate]
Possible Duplicate:
How to minimize a window to the taskbar? (i.e. not iconify)
I want t开发者_Python百科o show some form before showing the main form in my app, I do:
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
with TForm2.Create(Application) do
try
ShowModal;
finally
Free;
end;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
It's working properly but when I minimizing first form (TForm2) it's doing something like this (not minimizing to taskbar):
What's wrong?
Try to Hide
it before you Free first. I don't know but if your first form is an authentication form maybe you could also use ModalResult
to be sure that the user's response was ok.
Hope this helps.
精彩评论