There's no need to step by 0.01. You simply multiply your Maximum by 100 and then step by 1.
As for vertical orientation, I'm sure there are various examples available, both free and commercial, with varying degrees of professionalism. If you want the visual style of the standard .NET ProgressBar then you might not get a freebie, but then again you might. I'm not aware of any specifically but if I wanted one I'd be searching the web for the obvious keywords.
Alternatively, it's not that hard to create your own progress bar. You could simply use a Label or a Panel and adjust its Height according to some calculation. You could also get fancier, using GDI+ to draw the bar with textures or whatever.
The standard progressbar can be shown vertically as well by using some API's. I can't remember nor find them anymore but I'm sure they exist.
EDIT
Try this:
vb.net Code:
Imports System
Imports System.Windows.Forms
Public Class VerticalProgressBar
* * Inherits ProgressBar
* * Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
* * * * Get
* * * * * * Dim cp As CreateParams = MyBase.CreateParams
* * * * * * cp.Style = cp.Style Or &H4
* * * * * * Return cp
* * * * End Get
* * End Property
End Class
I don't think this is the way I did it in the past, but it seems to work. It draws the progressbar just the same as the standard windows progressbar so there's no worry about it looking different.
Note that it's value counts from the bottom up though, so a Value of 30 would show the bottom 30% filled and the top 70% not filled. I'm not sure if you can get it the other way around.
Last edited by NickThissen; Dec 4th, 2009 at 01:11 PM.
What is more odd to me is why the .NET progress bar doesn't support vertical. The VB6 one did. I even thought about importing the common controls OCX and using that, but then I figured you wouldn't get visual styles probably. So I searched because I figured there would likely be some winproc override or something of that nature to change the progbar orientation, and sure enough, there it was