either i'm no understanding all you, or i did no make my self clear in the original question. All i want to do is close a MDIchild. when the user clicks on the childs x button, or on the main form's menu on close or Close All. My app, creates the children dinamically:
procedure TMainForm.New1Click(Sender: TObject);
var memovent:TRichEdit;
begin
Veditors:=TForm.Create(self);
Veditors.Name:='editor'+IntToStr(editorsCount);
Veditors.FormStyle:=fsMDIChild;
Veditors.Parent:=Form1;
Veditors.Caption:='Editor '+IntToStr(editorsCount);
Veditors.Height:=300;
Veditors.width:=300;
memovent:=TRichEdit.Create(self);
memovent.parent:=Veditores;
memovent.Align:=alClient;
editorsCount:=editorsCount+1;
end;
this creates a form with a Richedit box in it. I have figured out how to open the file into the editbox, theres no real problem there. but now, the user has made the changes to the file he has saved the changes and he wants to close that editor, but not the program. I need to get rid of that child. but keep any other children that are opened.
Now how do i close it?
Thanx all of you for taking the time to help me.
Hope to here from you soon.