Image animation stops on minimizing and restoring
- by lc
I have a .NET WinForms application with an animated GIF in a PictureBox. It's a loading animation, shown while a BackgroundWorker does some processing in another thread. I load the image by setting the Image property and it animates on its own.
All is fine until I minimize and restore the application. At which point, the image stops animating and just displays whatever frame it was last on.
Note that:
The background thread still runs fine and none of the "business" of the application is affected.
Subsequently-displayed animated GIFs do work fine (unless the application is minimized again).
Does anyone know what causes this problem? Any workarounds?