Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mousewheel Delta value always 120

I am creating an application in WPF that uses the mousewheel to zoom in/out an image. The amount of zooming is based on the amount of mouse wheel turning.

The problem is that the Delta value is always 120, as explained in MSDN. So, even if I turn the wheel 1 notch or 5 notches it will always be 120. Do you know a way around this?

like image 234
Theodore Zographos Avatar asked May 07 '09 14:05

Theodore Zographos


People also ask

What is Mousewheel event?

The obsolete and non-standard mousewheel event is fired asynchronously at an Element to provide updates while a mouse wheel or similar device is operated.

What is Mousewheel JS?

About Mousewheel JS Mousewheel is a jQuery plugin that adds cross-browser mouse wheel support. Also, Scroll distance can be measured using Delta normalization.


1 Answers

You should be able to handle the PreviewMouseWheel event. The delta for each event will be +/-120, but you will get one event for each "notch" of the wheel.

like image 162
John Myczek Avatar answered Nov 16 '22 00:11

John Myczek