You'd think it'd be more obvious how to give your executable a unique icon. Every application has one. Why should yours be stuck with this:
Visual Studio has a built-in way to set your application's icon. It's just not immediately obvious.
1) In Visual Studio, open the Resource View panel (View > Other Windows > Resource View) or (Ctrl+Shift+E).
2) Right click your project (e.g. Project1), click Add > Resource. If it gives you an error for whatever reason, just try again.
3) In the dialog that pops up, click "Icon" and click "Import..."
4) Choose the icon you want. Make sure you make icons visible because ico's are the only filetype that'll work.
5) Visual Studio automatically takes that icon and tells your executable that's the way it's gonna look. So go ahead and build your project (Build > Build Solution) or (Ctrl+Shift+B). If you go to your project's debug folder (or release folder, depending on which mode you're in) (My Documents/Visual Studio {version}/Projects/{project name}/Debug/) you'll notice your application has a more acceptable appearance.
searches:
c++ set executable icon
visual studio set application icon
No comments:
Post a Comment