Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Scrollbar help
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Nitemare




PostPosted: 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
Sponsor
sponsor
NikG




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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?
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: