How to make the progress bar winforms move vertically in C #?

I am working on a WinForms Jukebox.
I would like to have a vertical ProgressBar to adjust the volume.

Does anyone know how to do this?

+6
user-interface c # progress-bar winforms
source share
2 answers

I donโ€™t know that I would use a progress bar to control the volume, but to display the volume level you could use a user control or you can just resize the shortcut with the background color (the last method seems to be shabby)

The progress bar is not intended for input, regardless of orientation.

If you really want to control the volume, use the vertical scroll bar or the track bar with a vertical orientation .

What is the discussion of how to create a vertical execution bar on MSDN , where they suggest doing it:

using System; using System.Windows.Forms; public class VerticalProgressBar : ProgressBar { protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.Style |= 0x04; return cp; } } } 

which sets the PBS_VERTICAL flag to Style .

+18
source share

For this you need to use ProgressBarRenderer. This is described on MSDN.

The documentation actually shows the implementation of the vertical ProgressBar, so it should be easy for you. :-)

+6
source share

All Articles