MouseLeave doesn't fire when form moves on LinkLabel click

Bucky

Well-known member
Joined
Dec 23, 2001
Messages
791
Location
East Coast
User Rank
*Expert*
Ive created a custom control that inherits the LinkLabel control
and adds some properties and painting routines. It also responds
to the MouseEnter and MouseLeave events of the base control.

When the control is used to move the form somewhere
else or to minimize the form the MouseLeave event never
fires, and then when the form is restored and other controls are
hovered over, THEIR MouseLeave events never fire. For
every control that becomes "stuck" like this, the MouseEnter
event also does not fire.

I tried calling MyBase.OnMouseLeave to artifically combat it, but
no luck; the control is still waiting for the mouse to officially leave.

How can I get the MouseLeave event to fire correctly?
 
Ah, I solved the problem with props to VolteFace. For some
reason, setting ShowInTaskar to false directly before or after
minimizing the form screws up those events. I had
completely overlooked the use of Show() and Hide() instead, and
they work perfectly.
 
Back
Top