Is there a Vertical progress bar that will step by 0.01
Printable View
Is there a Vertical progress bar that will step by 0.01
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.
WPF has the ability to rotate controls easily. If you are willing to use WPF, here is an example:
http://www.vbforums.com/showthread.p...g+progress+bar
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.
have a look here:
http://social.msdn.microsoft.com/For...5-d114fe456f54
EDIT: Looks like the same thing that Nick posted ;)
The very same indeed, I just ran the code through a translator.
I do wonder how we both found it while the OP didn't. I admit the keywords ".NET vertical progressbar" were a bit far-fetched though...
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 ;)
Thanks for the help. I found an example on CodeProject.