![]() |
Click here to advertise with us
|
|
|||||||
| Graphics/GDI+ Graphics discussion for VB.NET applications, Winforms, Web, Compact Framework, etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
|
|||
|
I don't get it... This doesn't work either.
Code:
For Each origProp As PropertyItem In img.PropertyItems
il.Images.Item(0).SetPropertyItem(origProp)
Next
MsgBox(il.Images(0).PropertyItems.Length) ' Length = 0
|
|
||||
|
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) Quote:
__________________
![]() 2007, 2008, 2009, 2010 Why is my data not saved to my database? | Communicating between multiple forms MSDN: Data Walkthroughs | "How Do I?" Videos My Blog: Custom Events | Dynamic GDI+ Drawing |
![]() |
| Bookmarks |
| Tags |
| gps, image, imagelist, propertyitems |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|