简体   繁体   English

如何在Microsoft Visual C#2010 Express中更改Windows窗体应用程序的启动图标

[英]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 . 在表单的属性中,您具有属性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. 如果要更改已编译的exe文件的图标,则需要转到项目的属性(在项目浏览器中的projrct上单击鼠标右键->属性),然后更改默认图标。

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, Visual Studio 2010 Express C#没有图标编辑器,

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). 免费的GIMP图形程序将图像导出为.ico文件,每个图标仅使用一层(例如16x16、32x32、48x48和64x64)。

The .ico file can then be dragged and dropped onto the Project Properties tab Resources/Icons pane. 然后,可以将.ico文件拖放到“ 项目属性”选项卡的“ 资源/图标”窗格中。 CustomIcon.ico will be named as (and recognised by IntelliSense) as CustomIcon . CustomIcon.ico将被命名为(并被IntelliSense识别为) 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. 在设计器中,属性窗口是表单的属性。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Microsoft Visual C# 2010 Express 中部署项目? - How to deploy a project in Microsoft Visual C# 2010 Express? 我应该使用Microsoft Visual C#2010 Express创建针对.Net 3.5的WPF应用程序吗? - should i use Microsoft Visual C# 2010 Express to create a .Net 3.5 targeted, WPF Application? 如何使用ClickOnce部署我的C#(4.0)Visual Studio 2010基于Windows窗体的应用程序? - How to use ClickOnce to deploy my C#(4.0)Visual studio 2010 windows form based Application? 如何在C#Windows窗体应用程序Visual Studio 2010中运行AVRDUDE - How to run AVRDUDE in C# windows form application visual studio 2010 可变着色帮助[Microsoft Visual C#2010 Express] - Variable Coloring Help [Microsoft Visual C# 2010 Express] Microsoft Visual Studio C#2010 Express:可以调试但不能构建 - Microsoft Visual Studio C# 2010 Express: Can debug but not build 使用Microsoft Visual C#2010 Express加载DLL - Loading DLLs with Microsoft Visual C# 2010 Express Visual C#2010 Express:在应用程序中为新表单打开设计和设计器选项卡 - Visual C# 2010 Express: Opening a design and designer tab for a new form in the application 如何在 c# windows 表单应用程序中将图标添加到上下文菜单 - how to add icon to context menu in c# windows form application 哪种构建操作(C#Microsoft Visual Studio)适合启动Windows窗体内具有零个或多个依赖项的.exe软件? - Which Build Action (C# Microsoft Visual Studio) is suitable for launching an .exe software which has zero or more dependents within a Windows Form?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM