How to Change the Icon in a Windows Forms Desktop Application

0

For a professional application, the small details count. Be sure to regularly communicate your brand in your Windows application, including its icon.

If you’re building a new desktop app, you might be following your own branding and design. This can include a custom color palette, UI design, or the icon that displays when a user opens your app.

When you use Windows Forms to build your application, Visual Studio adds a default icon to the upper left corner of your application window. You can replace it with an icon of your choice by modifying the properties of the form.


How to change app icon

You can change the default icon by going to form properties and uploading a new icon image.

  1. Create a new Windows Forms application or open an existing one.
  2. By default, the designer view should be open. Alternatively, right-click the form in the solution explorer window and click See the designer.
  3. The designer view acts as a canvas that you can use to add and modify UI elements. It also reflects how your application will look when running. Your current application icon is displayed in the upper left corner of the form. If you don’t have an icon, Visual Studio will use a default icon.
  4. Highlight the form by selecting it and navigate to the Properties window. This is usually located in the lower right corner of the Visual Studio window.
  5. Click on the three points (…) next to the Icon field.
  6. 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’re having trouble finding or creating icons, you can create a custom icon using Rainmeter.
  7. In the File Explorer window, click open to save the file. This will update the canvas with the new icon.


How to run the app and show your icon

You can see what your new icon looks like at runtime by launching the app.

  1. Click the green play button at the top of the Visual Studio window.
  2. Wait for the application to compile. When complete, the application window will launch showing the new icon in the upper left corner.

Creating Desktop Applications Using Windows Forms

If you are developing an application using Windows Forms, you may want to modify the icon to match your design.

You can change the icon in Visual Studio by opening the form properties window. You can then upload a new icon image in the icon field.

You can also add other UI elements or images to your app. If so, you can learn more about how to add graphics to a Windows Form application.

Share.

Comments are closed.