I am currently using Microsoft Visual Studio Community 2019
Version 16.10.2.
I am getting the following error
'ImageList.ImageCollection' cannot be converted to 'Image'. image ring trial
I am currently using Microsoft Visual Studio Community 2019
Version 16.10.2.
I am getting the following error
'ImageList.ImageCollection' cannot be converted to 'Image'. image ring trial
This basic test works for me :
Dim imageList1 = New ImageList()
imageList1.ImageSize = New Size(255, 255)
imageList1.TransparentColor = Color.White
imageList1.Images.Add(Image.FromFile("E:\\Hulk.png"))
Dim img As Image = imageList1.Images(0)
PictureBox1.Image = img
Thank you.
I just needed to replace '[ ]' with '( )'
This statement was all I needed
PictureBox1.Image=imageList1.Images(0).
However, the GIF image I am trying to display in the picture box is a static image.
Can you pls suggest any solution?
Thank youu
However, the GIF image I am trying to display in the picture box is a static image.
I don't understand what you mean by "static image"...
I mean the GIF image that i add to the image control will not be "Animated".
Only one image (out of several images from which GIF is created) is displayed, when i run the code.
If images are from an ImageList, it is normal
Animated GIF works if assigned directly PictureBox1.Image = Image.FromFile("C:\Animated_Gif_Test.gif")
4 people are following this question.