My C# program runs an animated GIFs. Is there any way to have it stop the animated GIF after a single loop (or a specified number of loops) through all the frames in the GIF?
Currently, I'm running the animated GIF's in a small PictureBox control that is on my main form:
this.AnimationGIF = new System.Windows.Forms.PictureBox();
AnimationGIF.Image = Image.FromFile(GIF filename);
The above will display and run the animated GIF continuously in the picture box. I currently stop it by running the above as a thread and stopping it after a fixed number of seconds. I would like it to stop automatically after a set number of loops through all the frames.