tags:

views:

465

answers:

1

Hello,

VS 2005 SP3

I have worked with the progress bar many times.

However, I need to have one that is vertical. However, I can't find any property that will rotate it.

Is the progress bar always in a horizontal position and cannot be changed.

Many thanks,

+8  A: 

Try this:

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

From: MSDN Forums

chrissr
For those wondering, 0x04 is the PBS_VERTICAL constant, defined in the commctrl.h header file in the Windows SDK.
Scott Dorman