I am new to C# and i am willing to learn it by creating different projects (I am working at one right now). I am trying to make a picture box show different frames of a gif file. I have tried doing this with FrameDimension and SelectActiveFrame but it won't work. I have also tried to split the frames of the gif and separate them into different .png files. I have added them in my Resources folder in my project and i have tried to make the picture box show them. Here is the code I wrote:
public void Form1
{
InitializeComponent();
DrawPNG();
}
public void DrawPNG()
{
Bitmap bmp = Properties.Resources.pic1;
picBox1.Image = bmp;
bmp = Properties.Resources.pic2;
picBox1.Image = bmp;
bmp = Properties.Resources.pic3;
picBox1.Image = bmp;
bmp = Properties.Resources.pic4;
picBox1.Image = bmp;
}
The problem is that the picture box will constantly show the first frame and it won't change. I am out of ideas of how to do this and I have looked up on the internet and haven't found anything. Can someone help me please?
Oh, and by the way, I am working on a Windows Forms Application.