Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 3.39 KB

how-to-specify-an-application-icon-visual-basic-csharp.md

File metadata and controls

70 lines (47 loc) · 3.39 KB
title description ms.date ms.topic helpviewer_keywords author ms.author manager ms.subservice
Set an app icon (Visual Basic, C#)
Learn how to specify the icon that File Explorer and the Windows taskbar display for a compiled Visual Basic or C# application.
09/27/2024
how-to
icons [Visual Studio], application
application properties [Visual Studio], icons
application icons [Visual Studio]
anandmeg
meghaanand
mijacobs
general-ide

Specify an application icon (Visual Basic, C#)

The Icon property for a project specifies the icon file (.ico) that displays for the compiled application in File Explorer and the Windows taskbar. This article describes how to specify an application icon.

You can access the Icon property from the Application section of the Project Designer, which contains a list of icons that have been added to a project either as resources or as content files.

Note

After you set the icon property for an application, you might also set the Icon property of each Window or Form in the application. For information about window icons for Windows Presentation Foundation (WPF) standalone applications, see xref:System.Windows.Window.Icon%2A property.

To specify an application icon

Complete these steps to specify an application icon.

::: moniker range=">=vs-2022"

  1. In Solution Explorer, select a Project node (not the Solution node).

  2. On the menu bar, select Project > Properties.

    [!TIP] You might see your project's file name when you view Project > Properties. For example, if you're working on a project that's named "Calculator", Visual Studio displays Project > Calculator Properties.

  3. The Project Designer appears. In the Application section, select one of the following:

    • For C#, select Win32 Resources.
    • For Visual Basic, select Resources.
  4. In the Icon section, select the Browse button to browse to the location of the icon file that you want to use.

::: moniker-end

::: moniker range="<=vs-2019"

  1. In Solution Explorer, select a project node (not the Solution node).

  2. On the menu bar, select Project > Properties.

    [!TIP] You might see your project's file name when you view Project > Properties. For example, if you're working on a project that's named "Calculator", Visual Studio displays Project > Calculator Properties.

  3. When the Project Designer appears, select the Application tab.

  4. In the Icon section, choose an icon (.ico) file by using either of the following methods:

    • For Visual Basic, in the Icon list, choose an icon file.
    • For C#, near the Icon list, select the Browse button to browse to the location of the icon file that you want to use.

::: moniker-end

Related content