How to disable Progress bar’s animation in .NET


The Windows Forms progress bar control comes with re-draw bar function by default, you will see the drawing process from left to right when you have one or multiple progress bar controls on your screen.

How to disable the Progress bar's animation in a .NET Windows Forms application?

So how to disable the animation since in some cases we do not want to see the re-drawing.

There is no a good solution for it. Actually there is a simple way to resolve the issue, but it is just looked wired.

Just put the following code, and then you set the value to progress bar, the animation will gone! Because the progress bar has a wired feature: when you set a value to it, and –1 right away, the animation will be disappear!

this.progressBar1.Maximum = 101;   
this.progressBar1.Value = 101;
this.progressBar1.Maximum = 100;