Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

[RESOLVED] ProgressBar1 did not advance...

$
0
0
Hi. I am testing a very simple progressbar code where the progress bar is supposed to advance (its tick bar display) once every second, after I had clicked the start button. The Timer1 is setup to interrupt once every 1000mS (1 second), and progressbar1.min = 0:

HTML Code:

Private Sub Start_Click()
Timer1.Enabled = True
ProgressBar1.Value = ProgressBar1.Min
End Sub

======================================================
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
======================================================

Private Sub Timer1_Timer()

  ProgressBar1.Value = ProgressBar1.Value + 1
    If (ProgressBar1.Value = 10) Then
        Timer1.Enabled = False
        Label1.Caption = "All Done"
        Timer1.Enabled = False
    End If
End Sub

Name:  ProgressBar1.JPG
Views: 36
Size:  8.9 KB

The code did stopped after its value had reached 10 but there are only two tick bars on the progressbar display??
Please advise. thank you.
Attached Images
 

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>