home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 February
/
Chip_2000-02_cd.bin
/
zkuste
/
Delphi
/
navody
/
tip2
/
700.txt
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
40 lines
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{ Downloaded from The Coder's Knowledge Base }
{ http://www.netalive.org/ckb/ }
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{ @ CKB Header Version.: 1.01 }
{ @ Category ID........: delphi_misc }
{ @ Added to database..: 10.11.98 }
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{ @ Title..............: OnMouseleave event }
{ @ Original Filename..: mouseleave.txt }
{ @ Author.............: Steve Davidson (sdpixel@wolfenet.com) }
{ @ Description........: How to trap mouse leaving a control }
{ @ Tested w. Compiler.: not tested yet }
{ @ Submitted by.......: Unofficial Delphi Developers FAQ (uddf@gnomehome.demon.nl) }
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
All descendants of TComponent send a CM_MOUSEENTER and CM_MOUSELEAVE message when the mouse enters and leaves the bounds of the
component. You will need to write a message handler for the respective messages if you wish to respond to them.
procedure CMMouseEnter(var msg:TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var msg: TMessage); message CM_MOUSELEAVE;
..
procedure MyComponent.CMMouseEnter(var msg:TMessage);
begin
inherited;
{respond to mouse enter}
end;
procedure MyComponent.CMMouseLeave(var msg: TMessage);
begin
inherited;
{respond to mouse leave}
end;