I made a custom button with some panels and pictureboxes. With the MouseEnter and MouseLeave I set the appropriate hover images like normal buttons.
The problem is that if I move the mouse too fast over the control it sometimes doesn’t trigger the MouseLeave event. This way the button is “locked” in hover state.
screenshot problem:
http://www.jesconsultancy.nl/images/screens/screen_prblm.png
the button at the right is locked in “hover” state.
How can i solve this?
Thanks.
Holy… That’s a mess!
Firstly,
UserControls are very buggy. I suggest you make your control inherit fromControlinstead and draw the image and text yourself.Secondly, why are you using reflection?
Thirdly, why are there so many controls?
This misses the event because it takes too much to update!
Here is some code for the simples control possible, that will NEVER miss an event: