[DUG] Mouse over form
John Bird
johnkbird at paradise.net.nz
Sun Jul 2 10:52:24 NZST 2006
I wish to have a small form be mainly transparent and less transparent when
the mouse moves over it. The form onMouseEnter and onMouseLeave are almost
perfect, except that moving the mouse to any components on the form also
fires the onMouseLeave event, and the border/title bar also is not counted
as part of the form either.
Question - Is there any way to detect the mouse is anywhere within the form
without having to put mouse events on all components or doing a continuous
monitoring of the mouse position?
The best solution I have so far is to reduce the transparency of the form on
MouseEnter, and leave it so for a few seconds before making it more
transparent again after a few seconds...but its not ideal as this can happen
if the mouse is still within the form.
(One reason I don't want to put events into the components is that one of
them a colorbutton already has a mouseover event to change color)
John
More information about the Delphi
mailing list