How To..Mouse

  • Thread starter Thread starter Pohihihi
  • Start date Start date
P

Pohihihi

I have a form A with lots of control on it. I am trapping MouseHover and MouseLeave to change opacity of the form. Problem is that when I move mouse over one of the control on the form MouseLeave is fired on the form. How can I control if mouse is on any part of form or on its childcontrols then it should not fire Leave event.
 
Hi Pohihihi,
you can modify your algorithm a bit to check when the mouse leaves the
form, plus look at the mouse co-ordinates to see if they lie inside or
outside the boundaries of the form. Only if you "leave" the form plus you
are really outside do you mark the form as left.

Mark Dawson
http://www.markdawson.org
 
Little extra work but nice technic. Thanks.

Mark R. Dawson said:
Hi Pohihihi,
you can modify your algorithm a bit to check when the mouse leaves the
form, plus look at the mouse co-ordinates to see if they lie inside or
outside the boundaries of the form. Only if you "leave" the form plus you
are really outside do you mark the form as left.

Mark Dawson
http://www.markdawson.org
 
Back
Top