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();
 
Back
Top