How do I get my .exe file to display a custom icon?

  • Thread starter Thread starter Tony Lin
  • Start date Start date
T

Tony Lin

I want my .exe file and its shortcut to display an appropriate custom icon
when listed in Windows Explorer. How do I embed or associate an icon with
my .NET application?


Tony Lin

Fremont, CA
 
Hi Tony,
I want my .exe file and its shortcut to display an appropriate custom icon
when listed in Windows Explorer. How do I embed or associate an icon with
my .NET application?

You need to set the /win32icon compiler option to include the .ico file. The easy way to do this is via the project properties dialog. From the MSDN:
"Open the project's Property Pages dialog box. For details, see Setting Visual C# Project Properties.
Click the Common Properties folder.
Click the General property page.
Modify the Application Icon property."
HTH,
Ian Cooper
wwww.dnug.org.uk
 
Ian,

Got it! Works great!

Thanks for all your help!

Tony Lin


Ian Cooper said:
Hi Tony,

You need to set the /win32icon compiler option to include the .ico file.
The easy way to do this is via the project properties dialog. From the MSDN:
 
Back
Top