
-----------------------------------
Nitemare
Thu Aug 17, 2006 7:57 pm

Scrollbar help
-----------------------------------
How do i make a scrollbar that changes a timer's interval?

-----------------------------------
NikG
Thu Aug 17, 2006 11:36 pm


-----------------------------------
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
Fri Aug 18, 2006 8:20 am


-----------------------------------
If that means when you scroll the scrollbar from side to side the timer's interval value changes, then yes.

-----------------------------------
cool dude
Fri Aug 18, 2006 11:51 am


-----------------------------------
double click on your scroll bar and the code window opens. then try something like so:


Timer1.Interval = Timer1.Interval + 10

everytime u use the scroll bar the timer interval will increase by 10

hope that helps

-----------------------------------
NikG
Fri Aug 18, 2006 1:10 pm


-----------------------------------
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
Sun Aug 20, 2006 1:29 pm


-----------------------------------
Would it be better to use a trackbar instead? Or do you need it to be vertical?
