vb.net animated gif

P

pannonej

I am using Visual Studio 2003, windows application and vb.net
When I change the (animation) gif image in a picture or button in
run-time the animation stops?

I get the new image from an imagelist.

Button2.ImageList = ImageList1
Button2.ImageIndex = 2

How do I get the new animated gif to animate?
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (pannonej) scripsit:
I am using Visual Studio 2003, windows application and vb.net
When I change the (animation) gif image in a picture or button in
run-time the animation stops?

I get the new image from an imagelist.

Button2.ImageList = ImageList1
Button2.ImageIndex = 2

How do I get the new animated gif to animate?

An image list cannot store an animated GIF. You will have to use
'Image.FromFile(...)' to load the image.
 
J

Joseph Pannone

Dim strFolderpath As String = CurDir() & "\pix\"
checkboxRecord.Image.FromFile(strFolderpath & "Microphone2.gif")
PictureBox3.Image.FromFile(strFolderpath & "Microphone2.gif")
PictureBox3.Image.

checkboxRecord.ImageList()
PictureBox3.Image.FromFile(strFolderpath & "Microphone2.gif")

'ImageList1.Images(0)
'checkboxRecord.ImageList = ImageList1
'checkboxRecord.ImageIndex = 2
'Button2.ImageList = ImageList1
'Button2.ImageIndex = 2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top