PDA

Click to See Complete Forum and Search --> : ProgressBar


QWERTY
Nov 11th, 1999, 05:53 AM
Thanks!!

------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.

QWERTY
Nov 11th, 1999, 11:04 AM
Can anybody give me an example on how to use ProgressBar (especially while saving and opening files) because I can't find anything about it in VB help.

Thanks

------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.

Compwiz
Nov 11th, 1999, 11:14 AM
Create the following:

Timer1 - Interval to 1, Enabled to False
Command1
ProgressBar1

and use the following code:


Dim sData As Integer
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
sData = 0
With ProgressBar1
.Min = 0
.Max = 100
.Scrolling = ccScrollingSmooth
.Value = sData
End With
End Sub
Private Sub Timer1_Timer()
If sData < 100 Then
sData = sData + 1
Else
sData = 0
End If
ProgressBar1.Value = sData
End Sub


Click On Command1 and Bingo!

------------------
Tom Young, 14 Year Old
tyoung@stny.rr.com
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer