Hello.
I have added a simple .gif file into Resources folder in my project.
Now i have created a user control with pictureBox. How can i add the .gif to pictureBox.Image = new Bitmap (path).
What is the path in this case?
thanx !
Hello.
I have added a simple .gif file into Resources folder in my project.
Now i have created a user control with pictureBox. How can i add the .gif to pictureBox.Image = new Bitmap (path).
What is the path in this case?
thanx !
I think you can do it in the following way:
// Create a MemoryStream from the .gif file resource
MemoryStream ms = new MemoryStream(YourApplicationName.Properties.Resources.GifFileName);
// Instantiate a new Bitmap using the created MemoryStream
pictureBox.Image = new Bitmap(ms);
Not completely sure if this works (cannot test it at the moment) but it should point you in the right direction.