我怎样才能改变一个控制台应用程序的Visual Studio中的图标? [英] How can I change the icon of a Console App in Visual Studio?

查看:566
本文介绍了我怎样才能改变一个控制台应用程序的Visual Studio中的图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2008中工作的C#控制台应用程序,但无法更改图标文件。

I am working on C# Console App in VS 2008 and am unable to change the icon file.

我在项目更改图标文件 - >属性 - >应用程序选项卡,但还是老图标与新的版本显示。

I changed the icon file in project-->properties-->application tab but still the old icon is displaying with the new build.

从后经过下面的答案,修改.resx文件。但我的应用程序已经得到了只有一个cs文件和.resx文件是空的。

Checked the below answer from a post to modify the .resx file. But my app has got only one .cs file and the .resx file is empty.

Visual Studio中,更改应用图标,怎么样?

任何帮助是极大的赞赏。

Any help is greatly appreciated.

推荐答案

在更改图标,你的项目的属性窗口是这个样子?

When you change the icon, does your project's Properties window look something like this?

   

   

请确保您重新编译(您可能需要先清理解决方案,然后重建),然后,你在正确的文件夹为您新建的可执行文件搜索。如果你在调试模式下进行编译,默认的文件夹(从项目的文件夹的根级别开始): \bin\Debug 。如果你在Release模式下进行编译,它会在 \bin\Release

Make sure that you recompile (you might need to clean your solution first and then rebuild), and then that you're searching in the correct folder for your newly-built executable. If you're compiling in Debug mode, the default folder is (starting from the root level of your project's folder): \bin\Debug. If you're compiling in Release mode, it will be in \bin\Release.

继上面的步骤,这对我来说工作正常。我的新创建的ConsoleApplication1得到一个漂亮的绿皮书图标:

Following the above steps, this works fine for me. My newly-created "ConsoleApplication1" gets a beautiful green book icon:

   

   

请确保你正在寻找正确的文件!只有你的可执行文件(.exe)将要接收自定义图标处理。包含在其名称中vshost该文件是由Visual Studio使用,而其他文件包含调试信息等。此外,.DLL文件无法显示自定义图标,Windows使用相同的图标为所有的DLL,它通常看起来像两个齿轮在一张纸上。

Make sure that you're looking at the right file! Only your executable (.EXE) is going to receive the custom icon treatment. The file that contains "vshost" in its name is used by Visual Studio, and the other files contain debug information, etc. Additionally, .DLL files cannot show custom icons—Windows uses the same icon for all DLLs and it usually looks something like two gears on a piece of paper.

如果您仍然没有任何运气,你可以更新你在做什么更多的细节你的问题,特别是?我无法重现您遇到否则问题。

If you still aren't having any luck, can you update your question with more details about what you're doing, specifically? I can't reproduce the problems you're experiencing otherwise.

这篇关于我怎样才能改变一个控制台应用程序的Visual Studio中的图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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