I am getting ready to release a .NET 2003 application, and this application has a file type associated with it.
During the installation I register the extension to be associated with my application, and everything is working fine.
My question has to do with the icons. I want a specific icon for the exe, and also a specific icon for the files associated with my app.
I want to have both icons in the exe file.
I guess my question would be, how do i embed 2 different icons into an exe, so that if you selected that exe as an icon source, windows would see the different icons in it (as seperate icons)
I know I can embed them as a resource, but windows only sees the main icon.
To give you an example, of what I am trying to do, winamp, the mp3 player program, has several icons in its exe (see picture)
(the visual studio IDE exe - devenv.exe - also has more than 1 icon in it)
Like yourself, i always assumed i could embed the images, and they'd be there to pick from. But i have tested this, and you're correct. it doesn't work like that.
I'm interested in knowing how to sove this as well.
I have done a little searching.. and it would appear you would have to include a win32 resource file in the exe... which is different than adding a managed .net resource file. I haven't finished investigating this, but it may require you use the assembly linker utility, or some other method that is outside the simple "build" from within the VS IDE
I am not sure exactly how to do it, and for the initial release, I am just going to include the second icon as a stand alone icon, and set the associations in the installer...
If I can find a solution to get both icons in the exe and visible to windows, I will implement that later on
There is a way to do it after you build your program in the IDE (at least in 2003 there was, havent tried it in 2005), however this method has to be done each time you want to release it, since after each build the info is overwritten...
After it is built, open up the executable in Visual Studio (File > Open File). You get a tree with "Icon" and "version" as nodes. Right click the Icon Node, and choose "Insert Icon". It then brings you to an icon designer where you can create a new icon. I created a couple, then saved it, and was able to browse to the exe and have the new icons show up as well in the list when trying to change the icon in windows.
However, the catch to this is when the exectuable is rebuilt, this process has to be repeated, as the information is cleared out because of the new EXE overwrite...
I am getting ready to release a .NET 2003 application, and this application has a file type associated with it.
During the installation I register the extension to be associated with my application, and everything is working fine.
My question has to do with the icons. I want a specific icon for the exe, and also a specific icon for the files associated with my app.
I want to have both icons in the exe file.
I guess my question would be, how do i embed 2 different icons into an exe, so that if you selected that exe as an icon source, windows would see the different icons in it (as seperate icons)
I know I can embed them as a resource, but windows only sees the main icon.
To give you an example, of what I am trying to do, winamp, the mp3 player program, has several icons in its exe (see picture)
(the visual studio IDE exe - devenv.exe - also has more than 1 icon in it)
Hi All,
This is *exactly* my problem:
2 years past and Visual Studio still cannot do what we want:
I know I can embed them as a resource, but windows only sees the main icon.
I am so glad that I am not the only one, it took me months to find this thread.
What I am looking for is a solution that permanently embeds icons so that it can be seen as shown in kleinma's screenshot.
Once done this can be also then utilized in Windows 7 API CodePack's IconReference class:
If you add the icons to your project (just as files in the solution explorer) and you set it to Embedded resource, doesn't that add them to the icon tree in the exe? I'm pretty sure that's how I did it in VS 2002/2003 and I still do that with MDB's in VS 2005/2008
Currently using VS 2015 Enterprise on Win10 Enterprise x64.
The only way that I know how to do it in 2008 is after you compiled your app do the following (think it is the same in 2003):
Build your app
Click the show all files button
Navigate to your app .exe in the Debug release folder in the Solution explorer
Double click on your exe
Rightclick on icon
Click add icon
... but this method is far from ideal as you need to do it each time