I realize there are other questions on SO regarding animations and progressbars, but they seem to revolve around getting rid of the animation drawn on top of the progress ba
Here is my extension method, based on David Heffernan's recommendation:
Wrap it up, hide it from view, and pretend it's not there!
public static class ExtensionMethods
{
///
/// Sets the progress bar value, without using Windows Aero animation
///
public static void SetProgressNoAnimation(this ProgressBar pb, int value)
{
// Don't redraw if nothing is changing.
if (value == pb.Value)
return;
// To get around this animation, we need to move the progress bar backwards.
if (value == pb.Maximum) {
// Special case (can't set value > Maximum).
pb.Value = value; // Set the value
pb.Value = value - 1; // Move it backwards
}
else {
pb.Value = value + 1; // Move past
}
pb.Value = value; // Move to correct value
}
}