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.
Asked
Active
Viewed 702 times
2
-
1Check this thread: http://stackoverflow.com/questions/198848/set-application-icon-from-resources-in-vs-05 – vgru Oct 07 '09 at 10:25
1 Answers
4
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.
But the resources that VS embeds in an assembly are managed (.NET) resources.
(I.e. there are multiple ways of embedding a resource in a .exe
or .dll
and you need to use the right way.)
VS will show you the native resources if you open the assembly file directly. .NET Reflector will show you the managed resources.

Richard
- 106,783
- 21
- 203
- 265
-
+1 for learn something new (that I feel I should have already known) every day. – Greg D Dec 03 '09 at 15:39