Dentro de un tiempo, no tanto como crees, sonreirás al ver este mensaje
. Te invito a que intentes deducir qué hace el código metiendo ShowMessages, cambiando líneas de código, etc, ya que es la única forma de aprender.
Código Delphi
[-]function ShowMDIChildForm(AFormClass: TFormClass):TForm;
var
I: Integer;
begin
for I := 0 to Pred(Application.MainForm.MDIChildCount) do
begin
Result := Application.MainForm.MDIChildren[i];
if Result is AFormClass then
begin
if IsIconic(Result.Handle) then
ShowWindow(Result.Handle, SW_RESTORE);
Result.BringToFront;
Exit
end
end;
Result := AFormClass.Create(nil) end;
Ahora puedes llamar a esa rutina así:
Código Delphi
[-]
procedure Mio;
var F: TFrmClientes;
begin
F=: TFrmClientes(ShowMDIChildForm(TFrmClientes));
F.LoqueSea
Saludos