471,618 Members | 1,514 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

How To..Mouse

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.
Feb 22 '06 #1
2 2327
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
"Pohihihi" wrote:
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

Feb 22 '06 #2
Little extra work but nice technic. Thanks.

"Mark R. Dawson" <Ma*********@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
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
"Pohihihi" wrote:
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

Feb 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by John Champaign | last post: by
9 posts views Thread by punkin | last post: by
3 posts views Thread by mitsura | last post: by
3 posts views Thread by Emjay | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.