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

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
 
I

Ian Cooper

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
 
T

Tony Lin

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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top