Jump to content

ProgressBar in VB6

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
12 replies to this topic

#1
MathX

MathX

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,001 posts
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:

Posted Image



Now double click on form1 and drag-and-drop a PrograssBar, a timer and a Button.


It will look something like this:

Posted Image



On form_load (simply double click on the form and you will be ready to write the code) wrote this line on code.

Private Sub Form_Load()

ProgressBar1.Value = ProgressBar1.Min

End Sub

It sets the value of the ProgressBar at min.

First set the interval of the timer:

Posted Image


Now double click on the timer and write this:

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

You probably understand this code. I wanted to make the progressbar faster from the middle of it.

Double click on the button (its name has been changed into “close”) and write:

Private Sub Command1_Click()

End

End Sub

It will close the program.

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!


#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Very neat. This can be used to create a "splash" screen.

#3
Egz0N

Egz0N

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,034 posts
nice tutorial dude :)

#4
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
Nice tutorial . +rep .

#5
MathX

MathX

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,001 posts
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!


#6
Turk4n

Turk4n

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,847 posts
This is something I must try :D


EDIT - Love you, enjoy rep+ :)

Edited by Turk4n, 13 January 2009 - 09:52 AM.

Posted Image

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Nice. I'd +rep you, but I can't.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,675 posts
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"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#9
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
i can +rep u now .. i think this +rep is gonna make you a GURU ..
Best wishes my friend .. :)

#10
Datasoft

Datasoft

    Newbie

  • Members
  • Pip
  • 1 posts
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.

#11
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
Mate, if you wish to get help, I would suggest you post in a new thread. Many more people will see your question and it will be answered in under 1 day :)
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#12
giv3mesmile

giv3mesmile

    Newbie

  • Members
  • PipPip
  • 14 posts
Nice! :) good job ^_^