Visual Studio 2017 - Specify an App Icon

坚强是说给别人听的谎言 提交于 2020-12-08 07:14:08

问题


I'm trying to add my icon as the default application icon in my Visual Studio project. The Microsoft 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?


回答1:


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.



来源:https://stackoverflow.com/questions/45246739/visual-studio-2017-specify-an-app-icon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!