PDA

View Full Version : WPF: detecting the speed of mousewheel scroll rotation



vladc77
July 23rd, 2009, 02:38 PM
Hello,

I am wondering if someone knows how to detect the speed of rotation (scrolled) of mousewheel. I need to initiate a function to run if the value will go ove certain speed. Any advice is highly appreciated.

Thank you in advance,

kirupa
July 23rd, 2009, 08:42 PM
One way I would do this is by having a timer and detecting how frequently the mousewheel is called within a given period of time. There is no way of detecting how quickly the mousewheel is spinning directly.

Cheers!
Kirupa

vladc77
July 24th, 2009, 02:28 PM
Yes, I tried something like that but wasn't able to achieve any good results. Do you mind to give an C# example of how it is possible to do? I was able only to detect the direction of the mousewheel rotation. Thank you in advance.