For a professional application, small details matter. Make sure you communicate your brand consistently through the Windows app, including its icon.
If you are building a new desktop application, you may want to follow your branding and design. This could include a custom color palette, UI design, or the icon displayed when a user opens the app.
When using Windows Forms to create the app, Visual Studio adds a default icon in the upper left corner of the application window. You can change it to an icon of your choice by editing the form properties.
How to change the application icon
You can change the default icon by accessing the form properties and uploading a new icon image.
- Create a new Windows Forms application or open an existing one.
- By default, the designer view should be open. Otherwise, right-click the module in the Solution Explorer window and click View Designer.
- The design view acts as a canvas that you can use to add and edit UI elements. It also reflects the appearance of the application at runtime. The current icon for your application is displayed in the upper left corner of the form. If you don’t have an icon, Visual Studio will use a default icon.
- Highlight the module by selecting it and go to Property Panel. It is usually located in the lower right corner of the Visual Studio window.
- Click on three points (…) next to Icon field.
- In the new File Explorer pop-up window, select your new icon. Upload a photo that uses an icon format such as an .ico file. If you have trouble finding or creating icons, you can create a custom icon using Rainmeter.
- In the File Explorer window, click to open to save the file. This will update the canvas with the new icon.
How to run the application and view your icon
You can see what your new icon looks like at runtime by starting the application.
- Click the green play button at the top of the Visual Studio window.
- Wait for the application to compile. Once completed, the application window will launch showing the new icon in the upper left corner.
Creating desktop applications using Windows Forms
If you’re developing an application using Windows Forms, you may want to change the icon to match your design.
You can change the icon in Visual Studio by opening the property sheet for the module. You can then upload a new icon image to the icon field.
You may also want to add other UI elements or images to your app. If so, you can learn more about how to add graphics to a Windows Forms application.