简体   繁体   English

ClickOnce开始菜单图标

[英]ClickOnce start menu icon

How do I set the icon for my start menu shortcut, when I deploy and install my application with ClickOnce? 当我使用ClickOnce部署和安装我的应用程序时,如何设置开始菜单快捷方式的图标?

Platform: Visual Studio 2010 Professional Beta 1 平台:Visual Studio 2010 Professional Beta 1

Double-click on the properties for your main project. 双击主项目的属性。

Click on the Application tab. 单击“应用程序”选项卡。 (I'm assuming C# here. If you're doing VB, post back if it's different and I'll see if it's the same.) (我在这里假设C#。如果你正在做VB,如果它不同则回发,我会看看它是否相同。)

In the middle of the page, there is an option for "icon and manifest". 在页面中间,有一个“图标和清单”选项。
Browse to find the icon you want to use and select it. 浏览以找到要使用的图标并选择它。
It needs to be in the top folder of your project; 它需要位于项目的顶层文件夹中; I think it will put it there when you select it. 我认为当你选择它时会把它放在那里。
The icon will be deployed with your project, and will be used in the Start Menu. 该图标将与您的项目一起部署,并将在“开始”菜单中使用。 (You can doublecheck the Application Files dialog -- it should be in there marked include(auto)). (您可以双击“应用程序文件”对话框 - 它应该标记为包含(自动))。

You can set the icon on the forms to point to the same icon, and show it on all your forms too. 您可以将表单上的图标设置为指向相同的图标,并将其显示在所有表单上。

The question that led me to this thread was the following: How do I set the icon for my start menu shortcut when I deploy and install my application with ClickOnce? 引导我进入这个主题的问题如下:当我使用ClickOnce部署和安装我的应用程序时,如何设置开始菜单快捷方式的图标? This is Rene's question as well. 这也是Rene的问题。

I did try the solution where one goes to the Application tab and in the middle of the page use the option for "icon and manifest". 我确实尝试了解决方案,其中一个进入应用程序选项卡,在页面中间使用“图标和清单”选项。 I made sure that the icon was in the various resource files. 我确保图标在各种资源文件中。 The icon appeared on my window form, but this failed to solve the problem: The start icon remained the default icon and did not change to my application's icon. 该图标出现在我的窗体上,但未能解决问题:开始图标仍然是默认图标,并未更改为我的应用程序图标。

It failed because there was another issue involved. 它失败了,因为涉及另一个问题。 The icon.ico file I had built for the form was 250x250 and 96px resolution. 我为表单构建的icon.ico文件分辨率为250x250和96px。 I rebuilt the application icon, which was located in the root folder, to 16x16 and 72px resolution. 我重建了位于根文件夹中的应用程序图标,分辨率为16x16和72px。 After doing this the Start Menu icon in Windows changed top my application's icon. 执行此操作后,Windows中的“开始菜单”图标会更改应用程序的图标。

如果您之前使用默认图标发布了应用程序,则必须卸载该应用程序并重新安装以使新图标正确显示。

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

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