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.
 
Back
Top