Howto Convert Icon to Image

  • Thread starter Thread starter Dirk Ströker
  • Start date Start date
D

Dirk Ströker

Hello,

I have a very simple problem; maybe the answer is simple, too, but I did not
find one until now:

I have a System.Drawing.Icon object where I need a System.Drawing.Image
object.

How can I convert the Icon into an Image?


Dirk Ströker
 
I have a System.Drawing.Icon object where I need a System.Drawing.Image
object.

How can I convert the Icon into an Image?

Call .ToBitmap() on the instance of Icon that you have. It will return a
System.Drawing.Bitmap which derives from System.Drawing.Image.

John.
 
Life is sometimes so simple!
Thanks John!

John Elliot said:
Call .ToBitmap() on the instance of Icon that you have. It will return a
System.Drawing.Bitmap which derives from System.Drawing.Image.

John.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Extract an icon from an imagelist 6
Get an Icon from an ImageList 1
Icon Stash 3
system drawing image cannot be converted... 3
Icon>>Image 1
Convert Image to Icon 3
VB code help 3
Converting from IMAGE to ICON 1

Back
Top