How to display a selected executable's main icon on my form (C#.NET 2.0 VS2005)

Hi :)

My application allows users to select other executable files and performs some functions with them.  I would like to display the main icon like explorer.exe would in tile mode on my applications form (PictureBox?).  I am currently reading the executable they select into a byte array so I can get other information from it.  An example of how to locate the image from the other executable now in my array and display it on my form would be greatly appreciated :)

Bosses are on me for this one and I would really like to add that feature before I give this to them :)
Who is Participating?
Fahad MukhtarDistinguished EngineerCommented:
You can use the new ExtractAssociatedIcon() Method in .Net 2.0 that retursn associated icon
Icon ico = Icon.ExtractAssociatedIcon(@"C:\WINDOWS\system32\notepad.exe");
jploettnerAuthor Commented:
Man that works sweet, I thought it would have been a real pain...  Thanks much :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.