If the value was 5 then I'd fill 5% of the ProgressBar. However this is not always the case as the Min/Max are properties(doubles) and the minimum could be... say -57 and the maximum could be... say -3. How would I find out what percentage to fill the ProgressBar?

Why did I ever curse out my 8th grade algebra teacher telling her I'd never use this crap?!!!

Edit: Ok, so I think I may have figured it out. Could somebody confirm it for me?

Take the maximum and subtract it from the minimum. I'll call this x

Take the value and subtract it from the minimum. I'll call this y

Divide y into x to get the percentage.

Using this with Min: -57 and Max: -3 and Value: -10, I'd do this:

-57 - -3 = 54

-10 - -3 = 47

47 / 54 = 0.87 or 87%

Edit #2: Then to figure out the amount needed to fill the control then I'd take the percentage above and multiply it by the control's width:

Code:

`Private Function GetPercentage() As Double`

Dim x As Double = max - min

Dim y As Double = pValue - min

Return y / x

End Function

Private Function GetFillWidth() As Double

Return Me.GetPercentage * Me.Width

End Function