Hi
Slight confusion of quite what you want. So, here is some code that will illustrate a ProgressBar being used with progress shown increasing from zero, and, progress shown decreasing from maximum to zero. The example has 2 buttons, one for INCREASING and one for DECREASING. The PBinc variable is used to hold the incremental size (I used 50 to speed up testing, adjust as needed. Give it a try and see if it helps. This is a stand alone example.
Option Strict On
Option Explicit On
Public Class Form1
Dim PBinc As Integer = 1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Interval = 1000
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' decreasing
StartPB(300, False)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
' increasing
StartPB(300, True)
End Sub
Sub StartPB(max As Integer, inc As Boolean)
ProgressBar1.Maximum = max
If inc Then
ProgressBar1.Value = 0
PBinc = 50
Else
ProgressBar1.Value = max
PBinc = -50
End If
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(PBinc)
If ProgressBar1.Value < 1 Or ProgressBar1.Value >= ProgressBar1.Maximum Then
Timer1.Stop()
End If
End Sub
End Class