C#应用程序图标文件 [英] C# Application Icon File

查看:74
本文介绍了C#应用程序图标文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我之前和之后在项目属性中为我的应用程序设置了一个图标文件,现在当我更改图标时,在获取发布exe后我点击了资源管理器中的更改视图,对于大视图,旧图标是所示。我认为旧图标仍在我的项目中。如何从项目中完全删除旧图标?

我想完全替换新图标。



谢谢

Hi
I set an icon file for my app in project properties before and now when I change the icon, after getting release exe I click change view in explorer and for big view the old icon is shown. I think the old icon is still in my project. how can I remove the old icon from my project completely?
I want to replace the new icon completely.

Thanks

推荐答案





http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx [ ^ ]



为了迎合各种显示尺寸,图标文件由一个或多个实际图标组成,每个图标代表一个特定尺寸和颜色深度的图标版本。例如,一个图标可能只有一个16x16像素图标和16种颜色,而另一个图标可能包含16x16像素和32x32像素图标,包含16种颜色和256种颜色。

如果所有可能尺寸的图标和颜色深度存在于图标文件中,Window将使用相应的图标。如果图标文件仅包含所有可能图标的子集,则Window会按照尺寸和颜色深度的减小顺序使用下一个最合适的图标。
from MSDN:

http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx[^]

To cater to the various display sizes, an icon file is composed of one or more actual icons where each one represents a version of the icon that targets a specific size and color depth. For example, one icon may only have a single 16x16 pixel icon with 16 colors, while another may contain 16x16 pixel and 32x32 pixel icons with both 16 colors and 256 colors.
If icons for all possible sizes and color depths exist within an icon file, Window will use the appropriate icon. If an icon file contains only a subset of all the possible icons, Window uses the next most appropriate icon in order of decreasing sizes and color depth.


如果您在VS2010中,请关注我的指示:



点击项目菜单。

点击申请(左上角)

选择单选按钮图标和清单

现在只需更改默认图标。

现在你完成了。
If you are in VS2010,,Just follow my instructions:

Click on "Project" menu.
Click on "Application" (Left top corner)
Select the radio button "Icon and manifest"
Now just change the default Icon.
Now you are done.


这篇关于C#应用程序图标文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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