void __fastcall TForm1::btnCloseAllChildsClick(TObject *Sender) { for(int i= MDIChildCount-1; i>= 0; i--) MDIChildren[i]->Close(); }