tags:

views:

3895

answers:

2

Hello,

I have imported an animated GIF as a resource into a picturebox - unfortunitly it only plays to the end frame and never repeats. Id there something I could do to make it loop continiously. The gif is for my "please wait busy box"

Brad

+1  A: 

Animated GIFs have a few different settings. Usually, embedded in the file is some data that tells the renderer how the image should be displayed.

This data says how fast the image is animated, if it should loop infinitely, or how many times it should repeat.

There are several programs available that you can use to edit an animated GIF and change the looping settings.

First, I'd open your GIF in some app to preview it to see if it loops before trying to alter the image.

Dan Herbert
A: 

You can use the System.Drawing.ImageAnimator class helper. You have the Animate, UpdateFrames, and StopAnimate methods to control the loop.

MF