Click to See Complete Forum and Search --> : How to use the Progress Bar?
Hello,
I am about to develop a backing up program and would like to know how to use and configure the 'Progress Bar'
Any tutorial or advise would be greatly appreciated.
Thanks
------------------
Robert Culver
IT Student
E-mail - robert_culver2000@hotmail.com
Web Page - http://www.visual-basic.org.uk
mcleran
Jan 26th, 2000, 09:00 PM
It's easy. You just indicate to the progress bar how far along you are in your code (0-100). Depending on what you're doing, you can set it manually like this:
pbarMine.Value = 50 'we're 50% done
Or, if you're doing something in a loop, you can update the progress bar every iteration:
For i = 1 to 10
Call SomeSub
pbar.Value = i*10 'so 1 = 10%, 2 = 20%, etc.
Next i
mooose
Jan 26th, 2000, 10:47 PM
when I use it, I usually put a code like so in a timer:
progressbar1.value = progressbar1.value + 1
and just increase the timers interval to make it go slower and incress the + 1 to make it go faster.
and if i had it on a splash screen the timers sub would probably look like this.
Private Sub Timer1_Timer()
progressbar1.value = progressbar1.value + 5
if progressbar1.value = 50 then 'see if its at 50%
load frmmain 'load main form to memory
end if
if progressbar1.value = 100 then 'check if its at 100%
frmmain.show
end if
end sub
------------------
Mooose
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.