Search code examples
c#.netwinforms

Application Icon doesn't change correctly using c#


I changed my Application's icon for a new one, by going to: "Project/MyProject Properties/Icon and Manifiest", and load the new icon. Now, in my debug folder the icon of my .exe file appear with the new icon, which is ok, but when I execute the .exe, the application icon in the taskbar still showing the old one.

Please advice.


Solution

  • You have two place to change your icon.

    First place

    The first place is in the project.

    1. Right click on the project
    2. Select Property
    3. Go in Application Tabs
    4. Choose Icon and Manifest and select the icon you want

    enter image description here

    Second place

    The second place is in the property of your Winform.

    1. Open the Form
    2. Click on the Form
    3. Press F4 or go in the property of the Form
    4. Go down in the property to find "Icon"
    5. Select the icon you want.

    enter image description here

    The reason you have a different icon in the taskbar than your application (.exe) icon is that the taskbar use the current form icon to display in the taskbar.