|
-
January 6th, 2000, 09:18 PM
#1
progressbars
how do you use progress bars in a form?
-
January 7th, 2000, 07:29 AM
#2
Re: progressbars
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|