There is a missing constant in the .Net framework. You are supposed to know that MouseEventArgs.Delta is expressed in increments of the constant WHEEL_DELTA, which is defined in WinUser.h. Sure, the MSDN docs have this value, but are we really supposed to hard code it when this statement also exists in the docs for the WM_MOUSEWHEEL message:
The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels in the future, including perhaps a freely-rotating wheel with no notches.
I suggested that the value be made available in the .Net framework (without having to write a C++/CLI class to compile in the value).
You can too… vote here: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=265810
Filed under: .Net Basics