31 August 2011

Close all MDI children forms

procedure T_c_form_desktop.FormClose(Sender: TObject; var Action: TCloseAction);
var
  i : Word;
begin
  inherited;
  if MDIChildCount > 0 then
     for i := 0 to MDIChildCount - 1 do MDIChildren[i].Close;
end;