Getting an Icon from an ImageList
Tuesday, April 14, 2009 8:44Posted in category Uncategorized
No Comments
If you have added icons to an imagelist in .NET, you might want to retrieve that icon. Yet, the ImageList.Image[n] will return an Image, not an Icon.
If you need the Icon, you can use this code:
Icon i = Icon.FromHandle(((Bitmap)imageList.Images[0]).GetHicon());
That’ll work.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Leave a Reply
You must be logged in to post a comment.
