Skip to main content

Problem:

What are the steps required to embed a specific icon into an executable?

Resolution:

To associate an icon to an executable file (.exe or .dll):

Have your project open in the release build or at least so you see the executable in the left hand window.  Then:

1. From the tool bar select File > New > Resource

2. Highlight icon, right click and select Import- then browse to your desired  .ico (icon) file and select it

3. Save the resource file created by selecting File > Save

4. Add the rc file to the project source pool (right hand side of project)

5. Drag the rc file to left hand side and make sure it is added under the executable - you should get the message 'would you like to add compiled types to the package' - Answer Yes and select OK (the .res file will now appear under executable)

6. Rebuild project and look at executable in Windows Explorer and it will appear as the specified icon

Old KB# 7094