Dela via


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

In the Icon property for a project, you can specify the icon file (.ico) that will appear for the compiled application in File Explorer and the Windows taskbar. Files in the .ico format can store images that are as large as 256x256 pixels. See the Icons guidelines.

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.

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 Icon property.

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.

See Also

Tasks

How to: Add or Remove Resources

Other Resources

Managing Application Properties