Retrieve the icon from an .exe file

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

Guest

Hi,

I'm making a kind of a task manager (Win XP like), where the user can see the list of running programs. My problem is to display the icons of these files. Is it possible with .Net CF.

Thanks.
 
This example works fine, but I can retreive only a 32x32 icon or it's 16x16 part, but not the 16x16 icon. In the line "Icon icn = new Icon(new MemoryStream( GetIcon(hIcn, true) ) );" I change "True" to "False", but only a part of the large icon is visible, not the small icon it self. What am I doing wrong

Thanks

----- Peter Foot [MVP] wrote: ----

You can do this indirectly, using an API function to get a HICON (handle to
a native icon) and then construct a managed icon from this
programmatically - see Alex Feinman's excellent article on this topic here:
http://www.opennetcf.org/PermaLink.aspx?guid=342bde3d-eeba-4d78-9748-29eb89ee13b

Pete
 
Back
Top