Actually, I did this another way.
Create two rectangles of the same height and aligned with the same left edge and top edge. They can be either borderless or have a hairline border.
Make one have a background of one color and the other one a background of a different color. I chose to have one bar with a white background and the other with a bright green, but that was because it looked good on my form. I made the green one come on top (Format>>Move to Front). I called them FrontBar and BackBar. FrontBar moves, BackBar does not.
Now when you want to show a progress bar, make them both visible. Set the width of the one in front to 1. Never touch the width of the one that is behind the moving bar.
FrontBar.Width = 1
FrontBar.Visible = True
BackBar.Visible = True
Now, at critical points in your code, do a scaling operation based on the fraction of completion that you have.
FrontBar.Width = ( BackBar.Width * CurrentValue ) / MaxValue
When done, make them both invisible.
FrontBar.Visible = False
BackBar.Visible = False