program Project1;uses Forms, Unit1 in 'Unit1.pas' {Form1};{$R *.res}begin Application.Initialize; Application.ShowMainForm:=false; // add this line Application.CreateForm(TForm1, Form1); Application.Run; end. 如果隐藏窗体的话如果关闭窗体的话。。太多了。 procedure TForm1.FormCreate(Sender: TObject); begin application.Terminate end;
為什麼要這樣處理呢??
application.Terminate;
或者在onshow里写form.colse;
form.hide;
Forms,
Unit1 in 'Unit1.pas' {Form1};{$R *.res}begin
Application.Initialize;
Application.ShowMainForm:=false; // add this line
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
如果隐藏窗体的话如果关闭窗体的话。。太多了。
procedure TForm1.FormCreate(Sender: TObject);
begin
application.Terminate
end;