I have a WinForm application that has a panel and two buttons inside the panel. I added a mousemove event on my panel and the mousemove function gets called when I move the mouse inside my panel, just like expected.
The problem is, if I press down my mouse button while over a button, the button depresses and if I move my mouse into the panel while still holding down the button, the Panel mousemove function never gets called till I release the mouse button.
Is there a work around for this? And if I’m not being clear, I can try to be more clear.
So it seems that while the button is depressed and the mouse moved back over the underlying panel, the panel’s MouseMove event is not fired.
You can capture the pointer position at this time by hooking into the button’s MouseMove. BUT, the pointer’s position will be relative to the button, not the panel, so you need to add these coordinates to the button’s location coordinate: