3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by xyzacorleone
0

Use a timer. drag n drop the timer n the progress bar on the form. On the top of the form code just after 'public class Form1' put 'dim i as integer = 0'. On the formload event put 'Timer1.enabled=true' Double click the timer n put this code: Progressbar1.increment(1) i += 1 if i = 100 then Timer1.enabled=false whem form loads, timer is enabled. When timer is enabled, it ticks. When it ticks the pbar is incremented with every tick up to 100.

0

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ProgressBar1.Value < 100 Then

ProgressBar1.Value += 5

End If

End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If ProgressBar1.Value > 0 Then

ProgressBar1.Value -= 5

End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

ProgressBar1.Value = 100

End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

ProgressBar1.Value = 0

End Sub

Edited by xyzacorleone: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.