How to assign an icon to an executable on windows (or visual studio)

25,187

Solution 1

Has mentioned in the comment, it is a duplicate question

Here is a copy paste of the answer from Jason Stevenson:

First go to Resource View (from menu: View --> Other Window --> Resource View). Then in Resource View navigate through resources, if any. If there is already a resource of Icon type, added by Visual Studio, then open and edit it. Otherwise right-click and select Add Resource, and then add a new icon.

Use the embedded image editor in order to edit the existing or new icon. Note that an icon can include several types (sizes), selected from Image menu.

Then compile your project and see the effect.

Solution 2

You can use a program such as Resource Hacker to edit resources (including icons) of Windows executables.

Share:
25,187
0x26res
Author by

0x26res

Updated on December 06, 2020

Comments

  • 0x26res
    0x26res over 3 years

    I would like to use a custom icon (a .ico file) for an executable, on windows (XP). The executable is a C++ program created thanks to visual studio (2008).

    How can I change the icon from the executable, to the .ico file I want?