I just got Win10 and confirmed. This is a side effect of the new Windows 10 feature configured in Settings> Devices> Mouse and Touchpad. It is called "Scrolling inactive windows when I hover over them", it is enabled by default. This web page mentions this.
In fact, this is a very nice feature, I personally will definitely save it, and most likely your users will also be. Previous versions of Windows sent messages with the mouse wheel to the control with focus, which led to the fact that many users began to get used to the way the mouse behaves, say, in the browser. Note that the scroll bar helps; it redraws the thumb to indicate that it is no longer active when you move the mouse from the panel.
Committing is technically possible; you will have to redirect the message back to the scroll bar. Nothing special:
public Form1() { InitializeComponent(); panel1.MouseWheel += RedirectMouseWheel; } private bool redirectingWheel; private void RedirectMouseWheel(object sender, MouseEventArgs e) { if (this.ActiveControl != sender && !redirectingWheel) { redirectingWheel = true; SendMessage(this.ActiveControl.Handle, 0x020A, new IntPtr(e.Delta << 16), IntPtr.Zero); redirectingWheel = false; var hmea = (HandledMouseEventArgs)e; hmea.Handled = true; } } [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
But do not skip weapons, your users tend to expect Win10 behavior, in the end :)
source share