Icon>>Image

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a function returning System.Drawing.Icon object How can i cast it to a System.Drawing.Image Object
 
I'm not completely sure, but I don't think you can cast directly from Icon
to Image. But you can draw the Icon into the Image.

Graphics g = Graphics.FromImage( image );
g.DrawIcon( icon, 0, 0 );
g.Dispose();
 

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

Back
Top