C# set Winform icon and version number

Lionsure 2020-08-09 Original by the website

Every new Winforms project has a default icon, but the publishing software usually needs to replace it with own icon(also known as the logo) to mark our product. The steps to change the icon are very simple in Visual Studio, but the hard part is to design a creative icon.

In addition, before releasing the software, you must not forget to set its version number, not only to indicate the current version, but also to prepare for future revisions and updates. Next, let's see how to set the icon first, and then see how to set the version number.

 

I. C# Winform icon setting method

1. Right-click the main project and select "Properties", as shown in Figure 1:

C# Winform icon setting method

Figure 1

2. In the opened window, make sure that "Application" is the current option, as shown in Figure 2:

Application is the current option

Figure 2

 3. Click the "Browse..." button to the right of "Icon", locate the folder where the icon is located, and double-click the designed icon, the icon becomes a Winforms icon.

4. The software icon is best placed in the resource file(Resources), or in the root directory of the software.

5. If the designed icon import software is not good-looking, you can modify it and copy it to the folder where the icon is located to replace the original icon. Winforms will automatically enable the new icon.

 

 

 II. Set and change Winform version number

1. Click "Assembly Information" in Figure 2, open the window as shown in Figure 3:

Set and change Winform version number

Figure 3

2. Enter the software title, description, development and release company, product, copyright, trademark, software version(assembly version), file version, and neutral languages ??can be selected or not.

3. Click "OK" to complete the software version setting, and finally don't forget to save it.

4. In the future, some features are added or some bugs are revised in the software, and the version number is modified in the same way.

 Whether it is icon modification or version number setting, for a programmer, the steps are very simple. Once you set it up, you know where it is and all problems are solved.