471,605 Members | 1,434 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Winform Events

Morning...

I'm looking for a good way to know when the mouse has left a specified panel
and/or form. I would normally wire in to the mouseleave event, but that
fires if I mouseover a control within the panel/form.

How has people solved this problem in the past? Do I have to get the mouse
position, compare it to the position of the form/panel and see if it is
within the boundaries? Sounds cluegy to me...
Dec 7 '05 #1
2 1442
Hi Jason,

As far as I know, this is by design. Windows will send message when the
mouse leaves the pannel and enters the button in the panel. I think you
have to handle the mousemove event and check for mouse positions to get
this done. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 8 '05 #2
Check the cursor position and see if it's within the form's client
rectangle... If it is, you're over a child... oh wait, the bottom part
of your mail states this ;)

Jason wrote:
Morning...

I'm looking for a good way to know when the mouse has left a specified panel
and/or form. I would normally wire in to the mouseleave event, but that
fires if I mouseover a control within the panel/form.

How has people solved this problem in the past? Do I have to get the mouse
position, compare it to the position of the form/panel and see if it is
within the boundaries? Sounds cluegy to me...

Dec 8 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael Huslig | last post: by
1 post views Thread by Will | last post: by
3 posts views Thread by Elliot Rodriguez | last post: by
8 posts views Thread by Sunil Menon | last post: by
5 posts views Thread by Marc Robitaille | last post: by
3 posts views Thread by Jose Fernandez | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | 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.