4

I was using a program made in C# and came across these progress bars, one of which is blue.

Here's a picture of the progress bars in question:

http://imgur.com/xAwA4

The forecolor property obviously doesn't do anything, so does anyone know how to do this?

Thanks

svick
  • 236,525
  • 50
  • 385
  • 514
kojak
  • 236
  • 1
  • 2
  • 9

2 Answers2

8

If its a winform application then do the following step

In Program.cs comment out the line

Application.EnableVisualStyles();

In code behind:

ProgressBar1.ForeColor = Color.Blue;
ProgressBar1.Style = ProgressBarStyle.Continuous;
Habib
  • 219,104
  • 29
  • 407
  • 436
  • However TerrariViewer (The application pictured) I belive uses custom progress bars, as It still retains visual Styles – Cyral Jul 29 '12 at 20:34
2

Disabling Visual styles as Habib suggested will work, But if you application relies on visual styles to look nicer, You will have to use a custom progress bar.

Color Progress Bar - CodeProdject

TerrariViewer uses Wpf as I understand, and if your willing to use that, this is a possibility

Progressbar foreground color

Community
  • 1
  • 1
Cyral
  • 13,999
  • 6
  • 50
  • 90