Reset MouseHover trigger?

  • Thread starter Thread starter Darren Croese.247 via .NET 247
  • Start date Start date
D

Darren Croese.247 via .NET 247

Greetings,

I have a large Paintbox control as the background of a form inVB.Net. This paintbox control has various shapes on it and Iwish to detect when the mouse is hovering over a shape.

This works fine for the first mousehover event but once the eventhas been triggered, it will not trigger again until the mousehas been moved outside the limits of the Paintbox and back inagain (ie the MouseLeave and MouseEnter events have beentriggered)

How can I directly 'reset' the status of whatever variable holdsthe MouseHover status so that it will automatically triggeragain without moving off the form?

Thanks,
Darren.
 
Hi Darren,

AFAIK you can't do that using Windows Forms framework. The only way to do it
is. I believe, to use PInvoke and call TrackMouseEvents API.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


Greetings,

I have a large Paintbox control as the background of a form in VB.Net. This
paintbox control has various shapes on it and I wish to detect when the
mouse is hovering over a shape.

This works fine for the first mousehover event but once the event has been
triggered, it will not trigger again until the mouse has been moved outside
the limits of the Paintbox and back in again (ie the MouseLeave and
MouseEnter events have been triggered)

How can I directly 'reset' the status of whatever variable holds the
MouseHover status so that it will automatically trigger again without moving
off the form?

Thanks,
Darren.
 
Back
Top