Progress Bar

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
I have a button and a progress bar on my form, when the button is clicked I want my timer to start and then every second I want the progress bar to increase by 10 (max is at a 100).

But I can't get the code right for the timer making it increase 10 each second, can someone help me?

Thanks.
 
'Start timer1 with the button click event

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'Increment progress bar
ProgressBar1.Increment(10)
If ProgressBar1.Value = 100 Then
'Do something here
End If

End Sub
 
Back
Top