Hi, i want to make a button add +10 to the progress bar every 1 second until it reaches 50.
I have added a timer with 1000 interval.
My problem is, that when i click the button, the progress bar goes to 50 instantly. It does not add 10 every second like i want it to.
Here is my code:
Thanks for any help.
EDIT: I took off the do until loop, and it worked fine. It kept adding +10. I just want it to stop at 50.
I have added a timer with 1000 interval.
My problem is, that when i click the button, the progress bar goes to 50 instantly. It does not add 10 every second like i want it to.
Here is my code:
Code:
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Do Until ProgressBar1.Value = 50
ProgressBar1.Value = ProgressBar1.Value + 10
Loop
End Sub
End Class
EDIT: I took off the do until loop, and it worked fine. It kept adding +10. I just want it to stop at 50.