How to add progress bar in vb 6.0
1. open vb 6.0
2. right click on tool box and select component
3. select control in which select microsoft windows common control 6.0(sp6) and press aplly and then ok..
How To Make Progress Bar Working In VB 6.0
coding part:-
Private Sub MDIForm_Load()
If Timer1.Enabled = True Then
ProgressBar1.Value = 1
End If
End Sub
Private Sub Timer1_Timer()
If Timer1.Enabled = True Then
ProgressBar1.Value = ProgressBar1.Value + 1
ProgressBar1.Min = 0
ProgressBar1.Max = 500
ProgressBar1.Value = 0
While Not ProgressBar1.Value = 500
For I = 0 To 500
'(Do nothing, but wait)
'( To show up the progress bar proceeding)
Next I
' (Update the progress bar and percent label accordingly)
ProgressBar1.Value = ProgressBar1.Value + 1
lblper.Caption = Int(ProgressBar1.Value * 100 / ProgressBar1.Max)
lblper.Refresh
Wend
If ProgressBar1.Value = 500 Then
Timer1.Enabled = False
Me.Hide
login_form.Show
End If
End If
End Sub
LIKE:-
No comments:
Post a Comment