...
type
TBitBtn = class(Buttons.TBitBtn)
private
procedure CMMouseEnter(var M: TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var M: TMessage); message CM_MOUSELEAVE;
end;
TForm1 = class(TForm)
BitBtn_Del_Memo: TBitBtn;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
...
Memo1: TMemo;
private
public
end;
var
Form1: TForm1;
implementation
...
procedure TBitBtn.CMMouseEnter(var M: TMessage);
var
WC : TWinControl;
begin
inherited;
WC := FindVCLWindow(Mouse.CursorPos);
if Assigned(WC) and (WC.Name = 'BitBtn_Del_Memo') then
with Form1.Memo1 do
begin
Clear;
Lines.LoadFromFile(ImagePath12);
end;
end;
procedure TBitBtn.CMMouseLeave(var M: TMessage);
begin
inherited;
Form1.Memo1.Clear;
end;
...