Visual Studio 2017-指定应用程序图标 [英] Visual Studio 2017 - Specify an App Icon

查看:525
本文介绍了Visual Studio 2017-指定应用程序图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的图标添加为Visual Studio项目中的默认应用程序图标. Microsoft 文档说要点击 Project -> Project Properties ,然后在 Project Designer 中选择 Application 标签 strong>.

当我点击 Project -> Project Properties 时,出现的不是 Project Designer ,而是(项目名称)属性页.如您在下面的照片中看到的,甚至没有与应用程序"选项卡远程相关的内容.

项目属性页的图像

如何将我的图标添加为默认应用图标?

解决方案

有一个.rc文件,当通过documentation says to click on Project -> Project Properties, and then select the Application tab in the Project Designer.

When I click on Project -> Project Properties, what comes up is not the Project Designer, it's (Project Name) Property Pages. As you can see in the photo below, there is nothing even remotely related to an "Application" tab.

Image of Project Property Pages

How can I add my icon as the default app icon?

解决方案

There is a .rc file that is generated automatically when an icon is added to the resources of the project via these instructions.

There is actually a comment within this file that answers the question directly.

// Icon with lowest ID value placed first to ensure application icon

// remains consistent on all systems.

Following this comment are all the icons, and as expected, the one with the lowest ID becomes the application icon.

Note: Sometimes when running the executable within VS, the icon will not show up in the toolbar.

这篇关于Visual Studio 2017-指定应用程序图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆