Adding animated gifs to Windows Forms (Winforms) applications
Sometimes, the hardest battles I face when programming is when I square off against myself (or something bone-headed I’ve done). I wanted to add an animated gif to a VB.Net Winform app to indicate that progress was occurring and the user should be patient. I couldn’t use a progress bar b/c my processing was determined by the number of data records I needed to process and data readers don’t give you a count. Chris suggested that I return the record count as an output parameter but I was too lazy to deal with that – and I wanted to use Spinny anyway
Meet Spinny – 
Anyway, I grabbed a copy of ReportServer.gif someone had mailed me and added it to the form. Easy enough, but it wasn’t spinning. How do I make it spin? I looked online. People seemed to have all kinds of advice on how to pick a single frame (or advance frame by frame, or even dynamically generate frames) out of a multi-frame image (animated gif) but no one seemed to know how to get the thing to start spinning. I looked in the help and tried the System.Drawing.ImageAnimator class but that guy kept telling me that the image’s CanAnimate property was False – my image was not a time-based multi-framed image.
I couldn’t figure it out. When I looked at my image in Internet Explorer, it spun. Nothing I could do programmatically would make it spin. This was really frustrating, especially b/c I couldn’t find any similar problems online. I was about to give up when I decided, as a last ditch effort, I’d try in new project. Blank form, picture box, brand new animated gif I’d downloaded. I used the PictureBox’s image chooser and picked my new image – guess what? It was spinning in the PREVIEW window! Naturally, when I ran the project, the image was animated! This was what I was looking for! Simple! Figuring my image was somehow corrupt, I downloaded it again myself and dropped it into my form. It worked. Spinny was now spinning.
— Matt Ranlett