Trackbar timer progres bar

add a trackbar , timer and a progresbar to a form after copy$paste the code, change the maxim value of track-bar from proprieties panel  to 101
do not make name changes

 

Public Class Form1

 

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.Timer1.Interval = Me.TrackBar1.Value + 1

        Timer1.Start()

 

    End Sub

 

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll

        Me.Timer1.Interval = Me.TrackBar1.Value + 1

    End Sub

 

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

        If Me.ProgressBar1.Value >99 Then

            Me.ProgressBar1.Value = 0

        End If

        Me.ProgressBar1.Value += 1

 

    End Sub

End Class