Ver Mensaje Individual
  #8  
Antiguo 17-08-2006
[maeyanes] maeyanes is offline
Capo de los Capos
 
Registrado: may 2003
Ubicación: Campeche, México
Posts: 2.732
Reputación: 26
maeyanes Va por buen camino
Cierto, se me pasó ese detalle, aquí te va una versión que toma en cuenta ese pequeño error...

Código Delphi [-]
procedure TMDIForm.AllButtonClick(Sender: TObject);
var
  NewMDIForm: TForm;

begin
  if Self.ActiveMDIChild is MDIChildrenClass[TButton(Sender).Tag] then
  begin
    if ActiveMDIChild.WindowsState = wsMinimized then
      ActiveMDIChild.WindowsState = wsNormal
  end
  else
  begin
    if Assigned(Self.ActiveMDIChild) then // Agrega esta línea para verificar si existe una forma MDIChild activa.
      Self.ActiveMDIChild.Close;
    NewMDIForm := MDIChildrenClass[TButton(Sender).Tag].Create(Application)
  end
end;

Última edición por maeyanes fecha: 17-08-2006 a las 18:24:16.
Responder Con Cita