c# - WinForms ScrollableControl's scrollbars capture mouse wheel? -


i have custom zoombox control based on scrollablecontrol controls scrollbars through autoscrollminsize property. able handle wm_mousewheel events adjust control's zoom. made necessary steps make sure control receives mouse events when not in focus, filtering them on parent form.

it seems though events reach onmousewheel method if control not have scrollbars active. if does, appears mousewheel events being redirected scrollbars handle them (by scrolling).

i scrollbars there controlled in "traditional way", i.e. dragging slider or clicking on arrows etc. , handle wheel myself. possible achieve that?

inherit scrollablecontrol in question , override onmousewheel(). in method don't call base.onmousewheel().

as far can tell there's no other way stop scrollablecontrol scrolling if scroll bars present.

a side effect no longer mousewheel events. fixing question. conceptually want call base.base.onmousewheel().


Popular posts from this blog