5,392
社区成员
发帖
与我相关
我的任务
分享
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2},
Unit3 in 'Unit3.pas' {Form3};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.CreateForm(TForm3, Form3);
Form2.Show;
Application.Run;
end.
unit Unit1;
...
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
Unit3;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form3.Show;
end;
end.
unit Unit2;
...
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
Free
end;
end.
unit Unit3;
...
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
Free
end;
end.