Bug 25201 - [MWF] Control.MouseWheel doesn't use HandledMouseEventArgs
Summary: [MWF] Control.MouseWheel doesn't use HandledMouseEventArgs
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
Depends on:
Reported: 2014-12-09 14:52 UTC by Chris Hubbard
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Sample Program that demonstrates disabling the Mouse Wheel (79 bytes, text/plain)
2014-12-09 15:36 UTC, Chris Hubbard
Failed Attempt (1019 bytes, patch)
2014-12-09 16:18 UTC, Chris Hubbard

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 25201 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Chris Hubbard 2014-12-09 14:52:00 UTC
The referencesource implementation of Control.MouseWheel event passes a HandledMouseEventArgs parameter so that a client can override the event and disable the MouseWheel for a control (by setting HandledMouseEventArgs.Handled = true).

See: http://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/Control.cs,13189
See: http://stackoverflow.com/questions/1882993/c-sharp-how-do-i-prevent-mousewheel-scrolling-in-my-combobox

Mono's implementation just uses the MouseEventArgs and always fires the Parent event handler.
Comment 1 Chris Hubbard 2014-12-09 15:36:23 UTC
Created attachment 9010 [details]
Sample Program that demonstrates disabling the Mouse Wheel

The code works with Microsoft's implementation but doesn't with Mono
Comment 2 Chris Hubbard 2014-12-09 16:18:01 UTC
Created attachment 9011 [details]
Failed Attempt

I tried following the Microsoft implementation, but running this on Mono doesn't disable to scrolling with the mouse scroll wheel.