3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to Integrate a Trackbar into Visual Basic

How to Integrate a Trackbar into Visual Basic
OK, so this sounds easy but the beginners have absolutely noidea how to do this. Trackbars can be useful tools. From deciding a budget to choosing how many fireworks to detonate, using trackbars are very very easily.

NOTE: Does anyone know how to increase the number of places on a trackbar? I can only get 11...
 
Remove these adsRemove these ads by Signing Up
 

Step 1Get your Form ready

Get your Form ready
This is pretty easy. Make when you want your program to look like. I'm not making anything in particular. I'll be making something that changes the colour of a textbox.

==Don't forget to add a trackbar!!!== Yes, alot of people forget that
« Previous StepDownload PDFView All StepsNext Step »
5 comments
Feb 11, 2009. 9:32 PMekulmeekul says:
Have you tested this without the "end if" at the end of every "if then" statement?
Feb 14, 2011. 6:36 PMSeifpic says:
Actually, you should do it like this instead:
If trackbar1.value = 0 then
'do something
Else if if trackbar1.value = 1 then
'do something
End if
Aug 28, 2009. 7:27 PMGamernotnerd says:
Slider1.Max = ("Value")
Slider1.TickFrequency = ("Value")

But that's VB6.
Feb 9, 2009. 2:35 AMzaketus says:
I haven't used VB almost at all (I've just made some simple controlling software for microcontroller projects few times). Is it possible to make color array? So you could replace that if then end if if then end if -"monster" with just
TextBox1.BackColor = colors (TrackBar.Value)
Or that might work with string array...

When working with some bigger sources it's much more comfortable to work, if code is compact (everything shouldn't be shrinked, but this kind of stuff can be, without making any harm).

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
3
Author:awang8
I hate brussel sprouts... Yeah, you really expected that in a profile didn't you?