Ver Mensaje Individual
  #2  
Antiguo 22-07-2005
Avatar de delphi.com.ar
delphi.com.ar delphi.com.ar is offline
Federico Firenze
 
Registrado: may 2003
Ubicación: Buenos Aires, Argentina *
Posts: 5.964
Reputación: 29
delphi.com.ar Va camino a la fama
Podrías valerte del Custom Message CM_VISIBLECHANGED

Un ejemplo funcional:
Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, Buttons;

type
  TMiPanel = class(TPanel)
  private
    procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED;
  end;


  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    FMiPanel: TMiPanel;
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ TMiPanel }

procedure TMiPanel.CMVisibleChanged(var Message: TMessage);
begin
  Caption := DateTimeToStr(Now);
  inherited;
end;

{ TFrom1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  FMiPanel := TMiPanel.Create(Self);
  FMiPanel.Parent := Self;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  FMiPanel.Visible := not FMiPanel.Visible;
end;

end.
__________________
delphi.com.ar

Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla.
Responder Con Cita