简体   繁体   中英

How do you change your app icon in visual studio 2013?

I'm new to visual studios and I just created this very short calculator and I want to put it on mediafire for people to download but I wanted to change the icon..

I've heard that you select your app in solution explorer and Project>Properties

But my properties menu seems different.

It saids calculator property pages.

It doesnt have the tabs like ~Publish~ or ~Applications~ where people said you change your icon.

My properties is like this:

Configuration: Active(Debug)

and some other stuff below it some complicated stuff(to me)

Why doesnt mine have what other people have? I just want to share my first ever app with a custom icon. Help please, will appreciate it.

Create a text file, rename it res.rc , edit it to contain the line:

201  ICON  "myicon.ico"

Add that file to your project. The file myicon.ico must exists.

Note : This is a bit hacky, the numerical vaulues should preferably be defined in a header.

You might be confused because Visual Studio supports different languages, and its UI is not consistent across those languages. Since you tagged it C++, the "old" rules apply. An application icon is a so-called resource.

You have to provide an .ico file, and reference it in a .rc file. The resource compiler (RC) compiles it into a .res file, and the linker then adds it to the EXE.

在C ++中,如果在设计器视图中打开表单,则属性窗口将具有一个图标属性,允许您浏览所选的图标。

Just for reference, i spent two hours trying to change it without any success until i resized the icon, it should be 32x32 and another one for small icon -not sure if its necessary though- with 16x16.

visual studio creates two icons when create the project , one is called small.ico and one is name yourexe.ico, just replace those and make sure to have correct sizes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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