What's the best way to tell if the mouse is over a form or not?

Posted by cyclotis04 on Stack Overflow See other posts from Stack Overflow or by cyclotis04
Published on 2010-05-20T14:33:53Z Indexed on 2010/05/21 9:50 UTC
Read the original article Hit count: 216

Filed under:
|
|
|

I figured out how to capture mouse clicks over the entire form, but this method doesn't translate well for MouseEnter and MouseLeave. My form layout is made up from many Panels and TableLayoutPanels so there's no all-encompassing control I can monitor events for, and obviously a MouseLeave event for a button doesn't mean the cursor left the entire form. Has anyone figured out a good way to get around this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET