How To..Mouse

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.
 
G

Guest

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
 
P

Pohihihi

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
 

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