-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of SystemInformation.MouseWheelScrollDelta within MouseWheel event for Zooming #8
Comments
Hello, Thanks for the bug report, that's something I haven't come across before. What mouse are you using? I don't really want to add random fixes without being able to reproduce it so I'm slightly wary of this code at present. The MSDN page for Many thanks for taking the time to log the issue and propose a solution. Regards; |
Hi, I had never come across it before either until I started using this mouse. The mouse I am using right now is a Microsoft IntelliMouse Explorer (Model: 1004) (Was previously using a Logitech Performance MX but I need to get a replacement) but as far as I know it is any mouse that has a high resolution/smooth scroll. I have found doing a search on Google for "High-resolution mouse wheel" brings up information. That fix is for when cannot do partial or per-pixel scrolling. So another way could be to change ProcessMouseZoom so it can do smaller increments using the delta. A crude way to reproduce the problem for testing would be to change the incoming delta values to a factor of 120 (will need to handle multiples aswell). This will simulate the problem for the mouse you are using. This will work (I have tested it with my Logitech Performance MX and it reproduces the problem):
Regards, |
Hello, Thanks for the follow up. I used to love my IntelliMouse Explorers, they were good mice and I still have a couple of receivers still floating around after the base units themselves gave up the ghost. I don't even think you can get them now, just as difficult getting Comfort Curve 2000 replacements. I'll take a look at this as soon as I can - I've been working on and off on a newer version of the control for some time now, should probably do some more work on that! Regards; |
Hi,
I want to bring attention to the usage of SystemInformation.MouseWheelScrollDelta which cannot be relied upon.
It causes an issue where cannot Zoom without scrolling the mouse wheel a lot because there are mice that have a different delta constant to what is given by SystemInformation.MouseWheelScrollDelta.
The mouse I have right now has a delta of 30 but SystemInformation.MouseWheelScrollDelta is 120.
The code where issue is:
One way to fix the issue is to keep a remainder of delta / SystemInformation.MouseWheelScrollDelta and make sure to reset the remainder to 0 if scroll direction changes or scrolling stops (after a period of time has passed).
I have put together code changes for the above fix. The code has been tested and the fix is working.
The text was updated successfully, but these errors were encountered: