I wanted to do a Vertical Progress Bar so i found this:
Vertical progress bar
But now like if you have Horizitonal Progress Bar you can make it work from LeftToRight / RightToLeft so i want my Vertical one to Work from UpToDown and not from DownToUp like it works now..
Is it possible?
Here is my code
public class VerticalProgressBar : ProgressBar
{
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Style |= 0x04;
return cp;
}
}
}
I’m using C# .NET 3.5 Windows Forms
There doesn’t seem to be any CreateParams that support inverted vertical ProgressBar. These are the style parameters from the Windows API:
I tried changing the RightToLeft values to no avail. There also doesn’t seem to be a way to arbitrarily rotate a Windows Forms control.
A possible solution may be to use the WPF ProgressBar. You could rotate it 90 degrees and it should do what you’re looking for. Another option is to use a third party Progressbar control or create a custom rendered one. It should be fairly easy to render a simple flat progressbar.