Ver Mensaje Individual
  #4  
Antiguo 26-11-2006
aledieb aledieb is offline
Miembro
 
Registrado: jun 2005
Ubicación: Buenos Aires, Argentina
Posts: 141
Reputación: 19
aledieb Va por buen camino
Yo utilizo otra forma, en form que llama al mdichild

Código Delphi [-]
  if estacargada('frmResuVenta')=-1 then
  begin
    Application.CreateForm(TfrmResuVenta, frmResuVenta);
    frmResuVenta.Show;
  end
  else
  begin
    Screen.Forms[estacargada('frmResuVenta')].WindowState:=wsNormal;
    Screen.Forms[estacargada('frmResuVenta')].Show;
  end;

La función es:
Código Delphi [-]
function EstaCargada(NombreVent:string):integer;
var i:integer;
begin
  estacargada:=-1;
  i:=0;
  while ido
  begin
    if UpperCase(Screen.Forms[i].Name)=UpperCase(NombreVent) then
    begin
      estacargada:=i;
      break;
    end;
    Inc(i);
  end;
end;

Tal ves no sea lo optimo pero funciona de maravilla. Lo unico a tener en cuenta que que los mdichild deben liberarse al cerrarlos poniendo action:=caFree; en el metodo close.
__________________
Suerte
Alejandro
Responder Con Cita