The Wrecking Bawl

Destructuring query language, one keyword at a time.


News


Apparently when you use an animated GIF as a background image in a control (e.g. button or picturebox), the image lacks animation, i.e. it just sits there with its starting layer.  This is kind of annoying, but I was able to work around it in this particular instance by using PictureBox.Image.  I suppose if I were really desperate I could have used Thread.Sleep with a bunch of different images on rotation to make it look like an animated GIF.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Comments

Gravatar # worse with imagelist
Posted by Willy on 3/30/2008 9:31 AM
Thanks for this post. As basic as it is- it helped me out. I've noticed this behavior to, and couldn't figure out why my animation wasn't working. I had specified the gif in the image property of the picbox. In my constructor for my class, though, I was resetting the image property to an index of the imagelist (which contained the animated gif). Removing the line in the constructor brought the animation back.

So apparently- you can't store an animated gif in an imagelist.

Thanks again- you pointed me in the right direction!
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: