none
How can I set the Application Icon in Visual Studio 2005

    Question

  • I am using Visual Studio 2005 Pro.

    I want to set the application icon for my Win32 exe. This is the icon that appears in the windows explorer next to the name of the application when it is viewed as a file.

    The logical place for this setting would seem to me to be to select the "solution" and then project properties and then look under Common Properties, but when I do this I see only a single entry "References" when has a bunch of empty reference lists and no obvious place to add an icon reference.

    I have examined I think every single property under the Configuration Properties for the solution and not found an entry for an application icon.

    I have already added 16x16 and 32x32 resources to the solution but cannot figure out how to make them into application icons.

    Thanks for any assistance.

    Wednesday, December 13, 2006 2:25 AM

Answers

  • I think you have to deal with "resources". 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.

     

    I hope this helps. For other related problem -- changing the displayed icon when the program runs, -- you can try the WM_SETICON message (or SetIcon function in MFC).

    Wednesday, December 13, 2006 8:43 AM
  • Robin,

    An icon resource usually contains multiple icons. Make sure you edit all of them (e.g. it may have 16x16 and 32x32 icons in the same ico file).
    Thursday, July 19, 2007 2:41 PM

All replies

  •  

    Hi,

    You need to do a right click,  properties on the Project name in Solution Explorer (not on the Solution name). Under the Application Tab there you have Icon in the Resources Tab. You can browse for the icon for your application out there.

     

    Hope that helps,

    Amol.

     

    Wednesday, December 13, 2006 2:53 AM
  • There is no application tab in the properties window for me.

    I right click on my project name, I choose Properties from the end of the list. A dialog box comes up entitled "launcher Property Pages" (launcher is the name of my project). This dialog has no tabs in it. I will describe this dialog box:

    Top: 2 combo boxes and a button, the first combo box is called "Configuration", the second combo box to the right of it is called "Platform", to the right of that is a button called "Configuration Manager..."

    Below on the left is a pane with a tree in it. There are two top-level nodes in the tree: "Common Properties" and "Configuration Properties". On the right is a detail pane that shows the property when you select it. Under Common Properties is a single node "References", Under "Configuration Properties" there are 10 nodes: "General", "Debugging", "C/C++", etc.

    Nowhere is there a tabbed control or Application Tab.

    BTW your description sounds like some descriptions on the web for how to set the application icon in Visual Studio 2003. I am using Visual Studio 2005 Pro.

    Wednesday, December 13, 2006 3:14 AM
  • I think you have to deal with "resources". 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.

     

    I hope this helps. For other related problem -- changing the displayed icon when the program runs, -- you can try the WM_SETICON message (or SetIcon function in MFC).

    Wednesday, December 13, 2006 8:43 AM
  • I am also having the same problem.

     

    I am using Visual Studio 2005 Standard.

     

    I have got an icon in the resources menu, that I have edited, however when I compile the solution the icon is not displayed next to the *.exe file.

     

    All of the documentation that I can find says that the way to do it is to right click on the project name and select "Properties" and then select the application tab, but there is no application tab.

     

    Please could you tell me how to set the application icon to be displayed with the application.

     

    Thanks for any help.

    Thursday, July 19, 2007 2:34 PM
  • Robin,

    An icon resource usually contains multiple icons. Make sure you edit all of them (e.g. it may have 16x16 and 32x32 icons in the same ico file).
    Thursday, July 19, 2007 2:41 PM
  • Nishant,

     

    Thank you very much for your help.

     

    My Icon now displays correctly with the application 

    Thursday, July 19, 2007 2:59 PM
  • Peace be upon you

    I have tried something it is working with me, all u have to do is to put "lowest" number for your ICON ID, for example

    IDI_IP        ICON                    "Icons\\u2.ico"
    IDI_ID        ICON                    "Icons\\ww.ico"

    if you want ww.ico to be your application Icon then you have to make "IDI_ID" have the lowest ID, that's all.


    I hope that solve your problem, I know the reply is so late :)

    BR
    Ahmed Essam

    Saturday, July 26, 2008 6:34 PM
  • Hello guys.

    I have the same problem. I'm using Visual Studio 2008, and running C++/CLI Windows Forms project. I tried all the methods mentioned here ( for some of which I came up myself ), including editing the resource files. The needed icon appears on the left side of the window, but the icon is different when I just go into Debug output folder for my application. I only see the old icon proposed by Visual Studio since the very beginning. How will I change that ? Is deleting app.ico the only way ?

    It is true that this shiny and awesome Visual Studio is missing Application pane in the Properties window for C++ projects. As hard as I tried, I failed to find an option that allows me to change the application icon in the Visual Studio environment. Please help.

    Tuesday, November 09, 2010 12:20 PM