Windows Forms .NET 2.0: How to draw a PNG icon?

前端 未结 3 859
我在风中等你
我在风中等你 2021-02-14 02:41

Note: Question Using 256 x 256 Vista icon in application deals with using a \"Vista\" icon as the application\'s icon. This question deals with manually paintin

3条回答
  •  深忆病人
    2021-02-14 03:26

    Today, I made a very nice function for extracting the 256x256 Bitmaps from Vista icons.

    I use it to display the large icon as a Bitmap in "About" box.

    This function takes Icon object as a parameter. So, you can use it with any icons - from resources, from files, from streams, and so on. It runs on any OS, because it does not use any Win32 API, it is 100% managed code :-)

    Bitmap ExtractVistaIcon(Icon icoIcon)
    

    I posted my function here: ExtractVistaIcon()

提交回复
热议问题