5 out of 19 rated this helpful - Rate this topic

How to: Specify an Application Icon (Visual Basic, C#)

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

  1. With a project selected in Solution Explorer, on the Project menu click Properties.

  2. Select the Application pane.

  3. Select an icon (.ico) file from the Icon drop-down list.

To specify an application icon and add it to your project

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.

  2. Select the Application pane.

  3. 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.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
How to re-use the application icon for forms
How can the application item be reused for a form at runtime?
Icon for setup project outputs and shortcuts
How do you ensure that the selected icon is used for the executable and all shortcuts to it on a setup project? $0$0 $0 $0Answer: (see http://msdn.microsoft.com/en-us/library/syyw4edd for context; this answer appears as a comment on that page as well)$0 $0If you have already added an icon to an assembly, you can access that icon from the assembly instead of adding it as a separate file. To do this, change the type of file in the Browse window to "All Files" and open the "Application Folder" - you should see "Primary Output ...". Select this item and click ok, then you should see an icon (in my case, it also had a numerical title) in the "Icon" window under "Current icon".$0 $0
WinForms note
If you have a Windows Forms application, be sure to also set the Icon property on the main form if you want Explorer to show that once your program is running, else you will still get the default icon.
Advertisement