简体   繁体   中英

How to change launching icon of windows form application in microsoft visual c# 2010 express

When we start debugging the project, a form is available displaying the items. It has a default icon containing a square block. Can we change that icon??

In the Properties of the Form you have the property Icon . If you click on it you will get a little button where you can select a local file.

If you want to change the Icon of the compiled exe file you need to go to the properties of your project (right click on projrct in project explorer -> properties) and change the default icon.

goto form properties and choose icon select path of the images.....

form properties>icon>select>icon image.

Visual Studio 2010 Express C# has no icon editor,

If you want to use custom icons, you need a way to create them. The free GIMP graphics program will export images as .ico files, just use one layer per icon (say 16x16, 32x32, 48x48 & 64x64).

The .ico file can then be dragged and dropped onto the Project Properties tab Resources/Icons pane. CustomIcon.ico will be named as (and recognised by IntelliSense) as CustomIcon . This is built in at compile time and has no need to reference external files at run time.

It can be used to change the window title bar icon from the Form Code as follows:

Size size = new Size(16,16);
this.Icon = new Icon(YourProject.Properties.Resources.CustomIcon, size);

In the Form Code Side:

        this.Icon = new Icon(@"C:\...");

In the Designer is in the Property-Window a property for the Form.

右键单击表单=>属性=>图标

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM