program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
mainfrm in 'mainfrm2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
form1 := tform1.Create(application);
form1.ShowModal;
if form1.frm_show = 1 then//frm_show設置為public,可在此調用
Application.CreateForm(Tmainfrm2, mainfrm2);
Application.Run;
end.