uses uchild;
...
procedure TfrMain.CreateChildForm
(const childName : string);
var Child: TfrChild;
begin
Child := TfrChild.Create(Application);
Child.Caption := childName;
end;
procedure TfrChild.FormClose
(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TfrMain.NewChild1Click(Sender: TObject);
begin
CreateChildForm('Child '+IntToStr(MDIChildCount+1));
end;
procedure TfrMain.CloseAll1Click(Sender: TObject);
var i: integer;
begin
for i:= 0 to MdiChildCount - 1 do
MDIChildren[i].Close;
end;
procedure TfrMain.Cascade1Click(Sender: TObject);
begin
Cascade;
end;
procedure TfrMain.Tile1Click(Sender: TObject);
begin
Tile;
end;
procedure TfrMain.ArrangeAll1Click(Sender: TObject);
begin
ArrangeIcons;
end;