Colored progressbar

2019-02-24 12:38发布

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

2条回答
Deceive 欺骗
2楼-- · 2019-02-24 13:01

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;
查看更多
兄弟一词,经得起流年.
3楼-- · 2019-02-24 13:06

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

查看更多
登录 后发表回答