Question Problem in ToolStripProgressBar painting (VS.Net 2010, WinForms).

priyamtheone

Well-known member
Joined
Sep 20, 2007
Messages
96
Programming Experience
Beginner
Ensure ApplyVisualStyles is enabled in your system. Place a ToolStripProgressBar on a toolstrip, run your application and minimize the form. Now change the theme of your computer to Windows Classic and restore the form. See the interior of the ToolStripProgrssBar becomes black. It doesn't even change if you refresh the form. How does the user know the status of the progress if it remains black always? Any approach to fugure it out? Regards.
 
It seems to be a bug, I can reproduce that. One way to remedy it is to handle SystemEvents.UserPreferenceChanged for e.Category=VisualStyle and change the progressbar.Style to something and back again.
 
Repainting the control by Invalidating or Refreshing it doesn't work too. Thanks for your code. It worked. Nice thing to know.
 
Back
Top