G Guest Apr 23, 2004 #1 I have a function returning System.Drawing.Icon object How can i cast it to a System.Drawing.Image Object
I have a function returning System.Drawing.Icon object How can i cast it to a System.Drawing.Image Object
G Gabriele G. Ponti Apr 23, 2004 #2 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();
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();