Winform Events

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

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...
 
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."
 
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 ;)
 

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

Back
Top