Hola Yo de nuevo,
He buscado en la Red y he encontrado esta dirección:
http://delphi.about.com/cs/adptips20...ltip0800_2.htm
El código funciona bien para un CheckBox, Label, StaticText, pero no así en un TButton,
TTabSheet, donde apunto mi pregunta,
¿Que implementación requiere dicho ejemplo para cambiar el color de la propiedad HotTrack en un TTabSheet?
Código Delphi
[-]
procedure TForm1.WndProc(var Mesg : TMessage) ;
begin
if Mesg.LParam = Longint(Label1) then
ChangeColor(Label1, Mesg.Msg) ;
if Mesg.LParam = Longint(Label2) then
ChangeColor(Label2, Mesg.Msg) ;
if Mesg.LParam = Longint(Label3) then
ChangeColor(Label3, Mesg.Msg) ;
if Mesg.LParam = Longint(CheckBox1) then
ChangeColor(CheckBox1, Mesg.Msg) ;
inherited WndProc(Mesg) ;
end;
procedure TForm1.ChangeColor
(Sender : TObject; Msg : Integer) ;
Begin
if Sender IS TLabel Then
begin
if (Msg = CM_MOUSELEAVE) then
(Sender As TLabel).Font.Color:=clWindowText;
if (Msg = CM_MOUSEENTER) then
(Sender As TLabel).Font.Color:=clBlue;
end;
if Sender IS TCheckBox Then
begin
if (Msg = CM_MOUSELEAVE) then
(Sender As TCheckBox).Font.Color:=clWindowText ;
if (Msg = CM_MOUSEENTER) then
(Sender As TCheckBox).Font.Color:=clRed ;
end;
end;