如何将桌面图标设置为 C# Windows Form

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17489928/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 09:37:31  来源:igfitidea点击:

How to set desktop icon to C# Windows Form

c#winforms

提问by mac stac

I have debugged C# WinForm exe. Copied it to desktop and want to distribute it to other people. How do I set an .ico for this exe, so that the desktop icon automatically appears on the computer, which downloads it too, without they don't adjust anything.

我已经调试了 C# WinForm exe。将其复制到桌面并希望将其分发给其他人。我如何为这个 exe 设置一个 .ico,以便桌面图标自动出现在计算机上,它也会下载它,而他们不做任何调整。

采纳答案by Theraot

In Visual Studio go to the properties of the Project:

在 Visual Studio 中转到项目的属性:

enter image description here

在此处输入图片说明

And then go to the Appligation tab, and select the icon in the resources options:

然后转到 Appligation 选项卡,并在资源选项中选择图标:

enter image description here

在此处输入图片说明

By clicking on the button at the right you can open an open dialog to choose your icon:

通过单击右侧的按钮,您可以打开一个打开的对话框来选择您的图标:

enter image description here

在此处输入图片说明



In Xamarin Studio right click the project to select Options:

在 Xamarin Studio 中右键单击项目以选择选项:

enter image description here

在此处输入图片说明

Then go to the General Tab:

然后转到常规选项卡:

enter image description here

在此处输入图片说明

By clicking on browse button you can open an open dialog to choose your icon:

通过单击浏览按钮,您可以打开一个打开的对话框来选择您的图标:

enter image description here

在此处输入图片说明

回答by SLaks

Set the Icon dropdown in Project Properties.

在项目属性中设置图标下拉菜单。

回答by Brian Snow

To specify an application icon (in VS2012):

  1. In Solution Explorer, choose a project node (not the Solution node).

  2. On the menu bar, choose Project, Properties.

  3. When the Project Designer appears, choose the Application tab.

  4. In the Icon list, choose an icon (.ico) file.

要指定应用程序图标(在 VS2012 中):

  1. 在解决方案资源管理器中,选择一个项目节点(而不是解决方案节点)。

  2. 在菜单栏上,选择项目、属性。

  3. 当项目设计器出现时,选择应用程序选项卡。

  4. 在图标列表中,选择一个图标 (.ico) 文件。

From MSDN

来自MSDN