Let's have a large Control
(whose Size
is given externally and "cannot" be altered). This Control
is contained in Panel
. There is very useful feature Panel.Autoscroll = true
, which enables comfortable scrolling of the large Control
with zero work.
There is one problem: The Control
needs to handle the MouseWheel
(and it gets the events as expected - it is focused on mouse enter). Ufortunately the Panel
also captures the same mouse wheel events and uses them for scrolling. This is not desirable for the cases the Control
"consumes" the events.
I cannot find a standard way to handle this. Even the Panel.Scroll
event is called only on mouse click scrolls, not mouse wheel scrolls.
Is there a natural WinForms friendly way how to temporarily instruct the Panel
with AutoScroll
set to true not to process the mouse wheel events for scrolling?