Unable to change default color of Progress Bar control in winforms
-
Why the default color green is not changed for progress bar control even though if change the forecolor property value to something else.it is always green by default.
-
Why the default color green is not changed for progress bar control even though if change the forecolor property value to something else.it is always green by default.
You cannot set the color unless you remove the line
Application.EnableVisualStyles();
from the main file. This line enables the default windows color on your application. Note that removing this line will have an impact on the entire form.Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial
-
Why the default color green is not changed for progress bar control even though if change the forecolor property value to something else.it is always green by default.
superselector wrote:
Why
From the documentation[^];
ForeColor and BackColor changes for the ProgressBar will not be honored when visual styles are enabled on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 and above.
You'd could paint your own progressbar, or try one the articles here on CodeProject.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]