January 6th, 2000, 08:18 PM
how do you use progress bars in a form?
|
Click to See Complete Forum and Search --> : progressbars January 6th, 2000, 08:18 PM how do you use progress bars in a form? Chris Eastwood January 7th, 2000, 06:29 AM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |