VB.NET: How to extract icon or image from ImageList

If you need to extract an image from ImageList control use this code:

Bitmap = DirectCast(MyImageList.Images(0), Bitmap)

or if you need an icon:

Me.Icon = Drawing.Icon.FromHandle(DirectCast(MyImageList.Images(0), Bitmap).GetHicon)

Alberto

Print | posted on mercoledì 30 marzo 2011 10.08

Feedback

No comments posted yet.

Your comment:





 
Please add 5 and 1 and type the answer here:

Copyright © Alberto De Luca

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski