WinForms: progress bar foreground color is always green on XP Luna
The WinForms ProgressBar control lets you set its foreground color. While this works fine, the foreground color setting appears to be ignored in XP when using the indecent Luna style: it's always green.
Likewise, XP Luna seems to ignore "style": although I set it to "Continuous", the progress bar is always drawn in blocks.
Is this supposed to be the correct behavior? Is there a way to get around this?
To disable Luna's visual style, you can remove the call to Application.EnableVisualStyles () in the auto-generated program class.
This will make all form controls created after this point look like Windows 2000.
You can roughly call this depending on the OS, as Vista's visual styles respect the Style property, IIRC (can't check right now - my laptop is dead).
You can handle the rendering of the control manually using the Paint event or by taking out of control and overriding OnPaint * ().
You can also roll from scratch as the progress bars are pretty simple.
a source to share