我从另一个应用程序使用此获得的图标:
I'm getting icon from another application using this:
Icon IEIcon = Icon.ExtractAssociatedIcon(@"C:\Program Files\Internet Explorer\iexplore.exe");
如何将其转化为 System.Drawing.Image对象?
在此先感谢。
在位图
是图片来源
所以你可以用图标的 .ToBitmap()
方法。
The Bitmap
is derived from Image
so you can use Icon's .ToBitmap()
method.
Icon IEIcon = Icon.ExtractAssociatedIcon(@"C:\Program Files\Internet Explorer\iexplore.exe");
Image im = IEIcon.ToBitmap();