paradox715
New Member
- Joined
- Jan 14, 2008
- Messages
- 13
Hello,
I'm trying to do something with a scroll wheel that is common on alarm clocks and other types of gadgets.
I want to have the scroll wheel increment 1 unit at a time when clicked. However, the longer the user holds down the button, the faster it will increment.
For example
.SmallChange = 1 'When a user clicks
.SmallChange = 2 'When the user clicks and holds for 3 seconds
.SmallChange = 5 ' When the user has been holding for 5 seconds
.SmallChange = 100 'Full speed, after holding for 10 seconds
I just don't know how to capture the length of time. In a perfect world, I don't want to write a lot of cases / IF/Thens - I was thinking there must be a more elegant way of incrementing based on a slope or curve.
I'm trying to do something with a scroll wheel that is common on alarm clocks and other types of gadgets.
I want to have the scroll wheel increment 1 unit at a time when clicked. However, the longer the user holds down the button, the faster it will increment.
For example
.SmallChange = 1 'When a user clicks
.SmallChange = 2 'When the user clicks and holds for 3 seconds
.SmallChange = 5 ' When the user has been holding for 5 seconds
.SmallChange = 100 'Full speed, after holding for 10 seconds
I just don't know how to capture the length of time. In a perfect world, I don't want to write a lot of cases / IF/Thens - I was thinking there must be a more elegant way of incrementing based on a slope or curve.