问题
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