mouse hover problem

W

wanwan

I'm trying to get the cursor changed to a hand whenever it stops in
the form, and have it changed back to default whenever the mouse
moves. So the common sense is to use the mousehover and mousemove
event.

The problem with using mousehover event is the event is triggered only
once after the mouse enters the form. I need mousehover to be
triggered whenever the mouse stops.

Is there a solution to the problem?
 
M

Martin H.

Hello WanWan,
The problem with using mousehover event is the event is triggered only
once after the mouse enters the form. I need mousehover to be
triggered whenever the mouse stops.

Set a timer and in the timer event compare the current position with the
previous position. If there is no change the mouse movement stopped.

Best regards,

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top