By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,192 Members | 1,534 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,192 IT Pros & Developers. It's quick & easy.

Icon in ImageList back to a USABLE Icon format...

P: n/a


Hi,

I load Icons in an ImageList.To do that I have to convert the Icons in the Bitmap format.



But HOW can I get My Icon back in a Usable Icon format ?



I tried the code below, but the Icons are drawn in a black square. (no more transparent color on the edges of the icons.)



Icon MyIcon = Icon.FromHandle((imgList.Images[position] as Bitmap).GetHicon());





Thanks for any help !



Steph.
Apr 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

Steph. wrote:
Hi,

I load Icons in an ImageList.To do that I have to convert the Icons in the Bitmap format.

But HOW can I get My Icon back in a Usable Icon format ?

I tried the code below, but the Icons are drawn in a black square. (no more transparent color on the edges of the icons.)

Icon MyIcon = Icon.FromHandle((imgList.Images[position] as Bitmap).GetHicon());

Thanks for any help !


I don't know for sure, but I think you're out of luck. The ImageList
(as its name suggests) holds Images - an Icon isn't an Image, so when
you convert an Icon to an Image, you lose information.

Maybe you can separately keep a collection of your Icons.

--
Larry Lard
Replies to group please

Apr 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.