c# - 彩色进度条

标签 c# .net visual-studio-2010 progress-bar

我在使用 C# 编写的程序时遇到了这些进度条,其中一个是蓝色的。

这是有问题的进度条的图片:

http://imgur.com/xAwA4

forecolor 属性显然没有做任何事情,所以有人知道如何做吗?

谢谢

最佳答案

如果它是 winform 应用程序,则执行以下步骤

Program.cs中注释掉这一行

Application.EnableVisualStyles();

在后面的代码中:

ProgressBar1.ForeColor = Color.Blue;
ProgressBar1.Style = ProgressBarStyle.Continuous;

关于c# - 彩色进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11712017/

相关文章:

c# - ASP.NET MVC 路由 : Can I have an action name with a slash in it?

c# - 如何在linq中加入两个列表

c# - 无法读取 dotnet 核心中链接的 appsettings.json 文件中的值

c# - 在 C# 中生成随机小数

c# - 安装 facebook c# sdk

c# - 我需要如何修改我的 WinForms 应用程序才能在控制台中运行?

.net - 垃圾收集不会减少当前的内存使用量 - 在 Release模式下。为什么?

c++ - MsiGetTargetPath C++

javascript - 使用 IE9、Visual Studio 2010、MVC3 和 Razor 语法调试 Javascript

c++ - 仅当在 Visual Studio 之外运行 EXE 时才会出现发布错误