procedure TfrChild.FormClose//子窗口
      (Sender: TObject; var Action: TCloseAction);
begin
 Action := caFree;
end

解决方案 »

  1.   

    uses uchild;//先做一个子窗体,设Formstyle为MDiChild;
    ...
    procedure TfrMain.CreateChildForm
             (const childName : string);
      var Child: TfrChild;
    begin
      Child := TfrChild.Create(Application);
      Child.Caption := childName;
    end;
    ...
    procedure TfrMain.CreateChildForm
             (const childName : string);
      var Child: TfrChild;
    begin
      Child := TfrChild.Create(Application);
      Child.Caption := childName;
    end;