Delphi工程运行的启动和退出画面

//工程文件

program Project1;

uses
  Windows,
  Forms,
  Unit2 in 'Unit2.pas' {Form2},
  Unit3 in 'Unit3.pas' {Form3};

//Unit3 in 'Unit3.pas' {Form3};
{$R *.res}

begin
  Application.Initialize;

//here...

  Form3:=TForm3.Create(Form3);
  Form3.Show;
  Form3.Update;
 {}
  Application.CreateForm(TForm2, Form2);
  //Application.CreateForm(TForm3, Form3);

  Sleep(2000);

  Form3.Hide;
  Form3.Free;
  {here...}

  Application.Run;
end.

 

//退出界面

//Form2 OnClose事件

 

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Form2.Hide;
  Form3:=TForm3.Create(Form2);
  Form3.Show;
  FOrm3.update;
  Application.CreateForm(TForm2,Form2);

  Sleep(1000);
  Form3.Hide;
  Form3.Free;
end;

end.

 

你可能感兴趣的:(Delphi)