Author |
Message |
Nitemare
|
Posted: Thu Aug 17, 2006 7:57 pm Post subject: Scrollbar help |
|
|
How do i make a scrollbar that changes a timer's interval? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
NikG
|
Posted: Thu Aug 17, 2006 11:36 pm Post subject: (No subject) |
|
|
You'll have to be a bit more specific...
This is my answer to your vague 1-liner:
Create a scrollbar control and set the max and min intervals you want, create a timer control, in the scrollbar's onchange or onscroll procedure, simply set the timer's interval value to the scrollbar's value. |
|
|
|
|
|
Nitemare
|
Posted: Fri Aug 18, 2006 8:20 am Post subject: (No subject) |
|
|
If that means when you scroll the scrollbar from side to side the timer's interval value changes, then yes. |
|
|
|
|
|
cool dude
|
Posted: Fri Aug 18, 2006 11:51 am Post subject: (No subject) |
|
|
double click on your scroll bar and the code window opens. then try something like so:
code: |
Timer1.Interval = Timer1.Interval + 10 |
everytime u use the scroll bar the timer interval will increase by 10
hope that helps |
|
|
|
|
|
NikG
|
Posted: Fri Aug 18, 2006 1:10 pm Post subject: (No subject) |
|
|
cool dude's method works if you don't want to set a maximum and minimum interval that the user can set, but the actual scroll bar may look a little weird that way.
What I suggested works if you need to set a min/max.
(A min might be necessary... you don't want a negative interval.) |
|
|
|
|
|
Echo
|
Posted: Sun Aug 20, 2006 1:29 pm Post subject: (No subject) |
|
|
Would it be better to use a trackbar instead? Or do you need it to be vertical? |
|
|
|
|
|
|