Hola.
Para evitar que te cree dos veces el mismo MDIChild, podés usar esta función en el MDIForm:
Código Delphi
[-]
procedure TMDIForm.CrearChild(ClassForm: TFormClass);
var
i: Integer;
begin
for i:= 0 to MDIChildCount do if Screen.Forms[i].ClassName = ClassForm.ClassName then begin
Screen.Forms[i].WindowState:= wsNormal; Screen.Forms[i].BringToFront; Exit; end;
with ClassForm.Create(nil) do Show; end;
Ejemplo de llamada:
Para que el MDIChild se cierre y no se minimize incluí en el evento OnClose del mismo:
Código Delphi
[-]
procedure TClientes.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:= caFree;
end;
Saludos.