Embedded application Icon in exe

Hi,

I have had a new icon to my project, setting Build Action to Embedded Resource. Using the application tab in the project properties, select this icon as application Icon. The result is that the ICON is not embedded in the "exe" but in a separate folder.

how can I embed it in the "exe".

Regards




Answer this question

Embedded application Icon in exe

  • karthic

    Hi, Thanks for the answer, but this was already done. now I do not know how to give that icon to my applicaiton.

    From the application tab, on the resource area I can assign an icon to my application from a file or from a "res" file, but I do not know how to get it form the one I have give to my resources.

    May I do it programtatically any example

    Regards



  • ShaunP1989

    hi,

    i guess the question is about how can the application icon take effect and appear on the exe file ,

    right click your project in solution explorer and select properties , in application tab you will find your option to set the application icon , build your application

    then from you HDD explorer navigate to your projectfolder/bin/debug  you will see yourproject.exe changed its icon

    hope this helps



  • Michael L. Georgia

    jaLG:

    The resource is automatically built into the exe when you compile your project; even if it is stored in a separate folder on your development machine (as a linked resource). There is nothing more that you need to do after you have added it to your project. This page has more info on resources: http://msdn2.microsoft.com/en-US/library/7k989cfy.aspx

    Does that answer your question

    Michael Blome - Visual C# documentation team


  • Praveen Sadhu

    Do you want to change your application's icon while it is running

  • Kynaeus

    I would add them directly to the resources. View the project properties and click the Resources tab. It will tell you if there are none and let you add a resource file in that case.

    Click on the Add Resource drop down and select Add Existing file. Select the icon you want and rebuild.

    Now you can access that icon via Properties.Resources.filename where filename is the name of the ico file without the extension.



  • Embedded application Icon in exe