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 .
Daniel LeCheminant
source share