Change default icon
If you are using Forms
you can use the icon setting in the properties pane. To do this select the form and scroll down in the properties pane till you see the icon setting. When you open the application it will have the icon wherever you have it in your application and in the task bar
The Icon property for a project specifies the icon file (.ico) that will be displayed for the compiled application in Windows Explorer and in the Windows taskbar.
The Icon property can be accessed in the Application pane of the Project Designer; it contains a list of icons that have been added to a project either as resources or as content files.
To specify an application icon
- With a project selected in Solution Explorer, on the Project menu click Properties.
- Select the Application pane.
- Select an icon (.ico) file from the Icon drop-down list.
To specify an application icon and add it to your project
- With a project selected in Solution Explorer, on the Project menu, click Properties.
- Select the Application pane.
- Select Browse from the Icon drop-down list and browse to the location of the icon file that you want.
The icon file is added to your project as a content file and can be seen on top left corner.
And if you want to show separate icons for every form you have to go to each form's properties, select icon attribute and browse for an icon you want.
Here's MSDN link for the same purpose...
Hope this helps.
Run it not through Visual Studio - then the icon should look just fine.
I believe it is because when you debug, Visual Studio runs <yourapp>.vshost.exe
and not your application. The .vshost.exe file doesn't use your icon.
Ultimately, what you have done is correct.
- Go to the Project properties
- under Application tab change the default icon to your own
- Build the project
- Locate the .exe file in your favorite file explorer.
There, the icon should look fine. If you run it by clicking that .exe the icon should be correct in the application as well.