ProgressBar is backed by the OS, like most Winforms controls. When visual styles are enabled, the default, then it uses the OS theming and blocks is not supported as shown here. To disable this you'd need to go to your Program.Main
function and comment out the EnableVisualStyles line. However that reverts your app to the "Win95" look which is probably not what you want.
ProgressBar style in WinForm
I tried to use ProgressBar in VS 2015 (VB.NET & C#) Community. It works OK except Style. Doesn't matter if I use "Continuous" or "Blocks" style I get "Continuous" style. I also tried in VS 2017 Community and I got the same behavior. It is strange. I downloaded one sample C# project and I am able to select between "Continuous"and "Blocks" styles. I use Windows 10 x64 20H2. I understand if "Blocks" would be disabled but I was able to run a project where everything works OK.
You understand that I use absolutely simple code. I can use "Continuous" style but I like I prefer "Blocks" style.
1 answer
Sort by: Most helpful
-
Michael Taylor 53,406 Reputation points
2021-06-03T15:07:26.297+00:00