Hi all!
Today I am going to make another simple tutorial about how to make a progress bar in VB6.
First you must include some components. Go to Project – Components – (in the list choose) Microsoft Windows Common Controls 5.0.
You will see this now:
Now double click on form1 and drag-and-drop a PrograssBar, a timer and a Button.
It will look something like this:
On form_load (simply double click on the form and you will be ready to write the code) wrote this line on code.
It sets the value of the ProgressBar at min.Code:Private Sub Form_Load() ProgressBar1.Value = ProgressBar1.Min End Sub
First set the interval of the timer:
Now double click on the timer and write this:
You probably understand this code. I wanted to make the progressbar faster from the middle of it.Code:Private Sub Timer1_Timer() ProgressBar1.Value = ProgressBar1.Value + 10 If ProgressBar1.Value = 50 Then ProgressBar1.Value = ProgressBar1 + 50 If ProgressBar1.Value >= ProgressBar1.Max Then Timer1.Enabled = False End If End If End Sub
Double click on the button (its name has been changed into “close”) and write:
It will close the program.Code:Private Sub Command1_Click() End End Sub
By MathX
Enjoy…
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
Very neat. This can be used to create a "splash" screen.
nice tutorial dude![]()
Nice tutorial . +rep .
Thank u all!!!
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
This is something I must try
EDIT - Love you, enjoy rep+![]()
Last edited by Turk4n; 01-13-2009 at 09:52 AM.
Nice. I'd +rep you, but I can't.
nice elban
rep to my riend
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
i can +rep u now .. i think this +rep is gonna make you a GURU ..
Best wishes my friend ..![]()
Hi
Can anyone help me, how to get the Progressbar follow a movieclip, so the Progressbar ends the same time as the movie?
Thank you.
There are currently 2 users browsing this thread. (0 members and 2 guests)
Bookmarks