Reputation: 8780
I have Googled and found multiple ways of adding multiple icons into the executable, but they all seem to work for VS 2003-2005-2008, nothing for VS2010. I have not tried the Win32 resource with /win32res because I do not know how to use it (can't figure to get a good Google result for that either).
Any simple suggestion?
Upvotes: 8
Views: 3373
Reputation: 4445
The Code Project article explains how to create a "assemblyWin32.res" file.
Upvotes: 0
Reputation: 8736
For C#.NET Here I found a good solution for this problem for c# projects as an example. But it only works in my C# projects
- Create a new "Native Resource Template" from the File | New dialog box.
- In project properties(project->application->resources) there is option to choose
resource file (.res)
rather than "Icon and manifest" which is selected by default (This option is visible only to C# projects!).
For VB.Net projects this link (Also mentioned here by Waldo) can be more helpful because in my visual 2012 there is no option to select/browse Native Resource Template(.res)
files but you could manually change project definition file for vb.net project as described to compile project win a native win32 resource file:
Open your project file in notepad (*.vbProj) and add the following block:
<PropertyGroup> <Win32Resource>assemblyWin32.res</Win32Resource> </PropertyGroup>
Upvotes: 0
Reputation: 3488
I've just created a simple tool to do exactly this without having to mess with .res files. It's a tiny utility which you can use as part of your Post-Build event and lets you add all icons files in a particular folder to your assembly. If we assume that you have a icons folder under your main project folder you can add the following post-build event:
C:\path\to\InsertIcons.exe $(TargetPath) $(ProjectDir)icons
A further description and a download can be found at http://einaregilsson.com/add-multiple-icons-to-a-dotnet-application/
Upvotes: 4
Reputation: 10532
This works for me: http://www.codeproject.com/Tips/160885/How-to-Embed-Multiple-Icons-and-Color-Animated-Cur.aspx
Upvotes: 2