• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

windows forms - animated Gifs

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Trying to catch up from the MFC world

Simple little program that has a bitmap image and moves it around the screen. Works great.
Image was of a bunny.

Now I am trying to have that image change into an animated image that is hopping.

I have loaded into the resource file, the animated image and the first frame of the image shows in the resource file (resx). So the picture itself is available.

I am using the PictureBox class to hold the images (both animated and static).
private System.Windows.Forms.PictureBox rabbit;
private System.Windows.Forms.PictureBox rabbit_Animated;


When I change the Image member variable to point to the PictureBox that contains the animated image, all that is then displayed is the animation background (grey)
rabbit.Image = rabbit_Animated.Image

Do I need to use some other type of class, set some other property or am I SOL in using this approach?
 
Needed to pull images from the Properties resource file, not the internal file
 
Back
Top