using a frame of an animated gif pic.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I was wondering if there is a way that I can set a single frame of a gif
file to a picture box programatically?

thanks,
 
Hi Gabe,

not shure but i think not. In Bob Powells
GDI+ FAQ is written that you couldn't
create Animated Gifs, because of the fact that
you couldn't add frames to the gif file.
So i think the other way round is also impossible.!?

http://www.bobpowell.net/animated_GIF.htm

Cheers
Lars Behrmann
 
You can select the active frame of the GIF image using SelectActiveFrame and
the FrameDimension.Time setting.

Once the frame is selected you can draw the frame to a second bitmap and
display it. Adding the GIF to the picturebox will start to animate it and
you'll loose the static effect.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
I've been trying to do this for a day now, but I cant seem to use
FrameDimension.Time correclty to invoke the SelectActiveFrame method. can you
give me a short example, if it's not too bothersome?
 
Back
Top