I just ran this code:
Code:
Dim img = Image.FromFile(filePath)
Me.ImageList1.Images.Add(img)
MessageBox.Show((img Is Me.ImageList1.Images(0)).ToString)
and got False, i.e. the Image object I added to the ImageList is not the Image stored in the ImageList. A new Image object is created based on the image properties defined by the ImageList. I don't know whether that is always the case but it obviously is in some cases at least. The documentation for the Image.PropertyItems property says:
Quote:
|
If the image has no property items or if the image format does not support property items, PropertyItems returns an empty array (that is, an array of length zero).
|
Presumably the image format supported by your ImageList doesn't support property items.