how do you use progress bars in a form?
Printable View
how do you use progress bars in a form?
You start by adding the common controls to your VB toolbox. Next, place the control on your form.
You then need to set properties of the ProgressBar - for instance, is it measuring a percentage complete or a maximum value ?
A simple code example follows : place a progressbar (ProgressBar1) and a button (command1) on your form, and then paste in the following code :
private Sub Command1_Click()
'
Dim lCount as Long
'
ProgressBar1.Max = 32768
'
for lCount = 1 to 32768
ProgressBar1.Value = lCount
If lCount Mod 1000 = 0 then
DoEvents
End If
next
'
End Sub
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb