1. 程式人生 > >delphi form內部呼叫建立自己

delphi form內部呼叫建立自己

var
  _MyData: TMyStructure; //傳遞的引數必須是全域性的

implementation

{$R *.dfm}
 

procedure TForm2.Excute_Form(MyData: TMyStructure);
begin

  _MyData := MyData;
  with TForm2.Create(Application) do
  begin
    try
      Init;
       ShowModal;
    finally
      Free;
    end;
  end;

end;