|
-
May 24th, 2006, 07:10 PM
#1
Re: [2005] MouseWheel Event
As far as your app is concerned the mouse wheel doesn't start and stop scrolling. The MouseWheel event is raised for each standard increment that the wheel is scrolled. There is no measure of whether the wheel is moving or not. The user might turn the wheel slowly, in which case the MouseWheel event will be raised at larger intervals, or the user might turn the wheel quickly, in which case the MouseWheel event will be raised at smaller intervals. Either way there is no indication of whether it was a continuous movements or a series of discrete movements.
You could use a hack to simulate what you want with a Timer, where each time the MouseWheel event is raised you set a variable to the current time and enable a Timer. Each time the Timer Ticks it checks the last time the MouseWheel event was raised and if it was more than a specified amount of time then it disables itself and stops whatever process was started when the MouseWheel event was raised.
I would question whether you're actually using the MouseWheel event properly. In the MouseWheel event the e.Delta property tells you how much the wheel was turned and that is intended to be used to increment or decrement some value. If you haven't already you should read the help topic for the Control.MouseWheel event.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|