I just got Win10 up and running, confirmed. This is a side-effect of a new Windows 10 feature, configured in Settings > Devices > Mouse & touchpad. It is named "Scroll inactive windows when I hover over them", it is turned on by default. This web page mentions it.
This is actually a very nice feature, I'll personally definitely keep it on and it is pretty likely your users will as well. Previous Windows versions sent the mouse wheel messages to the control with the focus, mystifying a great many users that got used to the way the mouse behaves in, say, a browser. Do note that the scrollbar helps, it redraws the thumb to indicate that it is no longer active when you move the mouse off the bar.
Fixing it is technically possible, you'll have to redirect the message back to the scrollbar. Nothing particularly pretty:
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 don't jump the gun yet, your users are apt to expect the Win10 behavior, eventually :)