VS2008,没有嵌入式应用程序的图标?嵌入式、应用程序、图标

由网友(姐的气质,你学不来つ)分享简介:我使用Visual Studio 2008中,我可以设置使用我的项目的应用程序图标 - >应用程序 - 选项卡与路径。但是,有什么办法来设置应用程序图标,嵌入的资源,而不是文件本身? 因为它看起来像VS被嵌入的图标的再次的只是为了这个目的,而是重新使用已经嵌入的资源。I'm using Visual Studio 2...

我使用Visual Studio 2008中,我可以设置使用我的项目的应用程序图标 - >应用程序 - 选项卡与路径。但是,有什么办法来设置应用程序图标,嵌入的资源,而不是文件本身? 因为它看起来像VS被嵌入的图标的再次的只是为了这个目的,而是重新使用已经嵌入的资源。

I'm using Visual Studio 2008 and I can set the application icon using the My Project -> Application - Tab with a path. But, is there any way to set the application icon to an embedded resource instead of the file itself? 'cause it seems like that VS is embedding the icon again just for this purpose, instead of reusing an already embedded resource.

推荐答案

应用程序图标,需要在本机的(Win32)资源的.exe (或 .DLL )的文件。这是通过使用本机资源的API壳萃取。

The application icon needs to be a native (Win32) resource in the .exe (or .dll) file. This is extracted by the shell using the native resource APIs.

但是,VS在组装嵌入资源管理(.NET)的资源。

But the resources that VS embeds in an assembly are managed (.NET) resources.

(即有嵌入的资源的的.exe .DLL 的多种方法,你需要使用正确的方法。)

(I.e. there are multiple ways of embedding a resource in a .exe or .dll and you need to use the right way.)

VS会告诉你的本机资源,如果你直接打开汇编文件。 .net反射会告诉你管理的资源。

VS will show you the native resources if you open the assembly file directly. .NET Reflector will show you the managed resources.

阅读全文

相关推荐

最新文章