Get Icon And Display

  • Thread starter Thread starter Chip Pearson
  • Start date Start date
C

Chip Pearson

I would like to display the default icon for a file type in a picture
on a Windows Form (NET 3.5). For example, if I have a file name of
"C:\Book1.xls" I would like to display the default icon for Excel. I
know how to get the exe associated with the "xls" file type, so how do
I get the default icon from the exe?

I'm using VB2008 in VS2008 with NET 3.5 SP1 on Windows Vista Ultimate
SP1.

Any suggestions would be very much appreciated. Thank you very much.

Chip Pearson
www.cpearson.com
 
Chip Pearson said:
I would like to display the default icon for a file type in a picture
on a Windows Form (NET 3.5). For example, if I have a file name of
"C:\Book1.xls" I would like to display the default icon for Excel. I
know how to get the exe associated with the "xls" file type, so how do
I get the default icon from the exe?

Take a look at 'Icon.ExtractAssociatedIcon'.
 
Back
Top