View Single Post
  #1 (permalink)  
Old 07-09-2009, 2:07 PM
xuser xuser is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Jul 2009
Age: 31
Posts: 2
Reputation: 0
xuser is on a distinguished programming path ahead
Question Image losing PropertyItems when adding to ImageList

I'm stumped... As soon as an Image with PropertyItems is put into the ImageList, it appears to lose that data. Anyone know why this is happening and how to resolve it?

Code:
' il is of type ImageList; img is of type Image.
MsgBox(img.PropertyItems.Length) ' Length = 68
il.Images.Add(img)
MsgBox(il.Images(0).PropertyItems.Length) ' Length = 0
MsgBox(img.Clone.PropertyItems.Length) ' Length = 68
il.Images(0) = img.Clone
MsgBox(il.Images(0).PropertyItems.Length) ' Length = 0
Reply With Quote