Multiple Icons In An Assembly

gorbit

Member
Joined
Sep 2, 2005
Messages
7
Location
Australia
I am currently writing a program in VB .NET that requires a file type - .fol - to be associated with it so that people can simply double click on the .fol file to get my program. My problem is that i want a seperate icon for the .fol file other than the one my assembly has. What i want is to be able to somehow put more than one icon into the assembly - other than the assembies icon - and link the default icon for the .fol file type with the second or third icon in my assembly, so that i dont have to include a seperate icon file with the assembly. Like the way Dreamweaver has its icons all its main assembly:

[Broken External Image]:http://www.talbotech.com/drmIcons.jpg

I have tried many techniques so far such as using IconForge to make a .icl file and try to set that as the default icon, and importing the icons into my project as Embedded Resources. But my efforts so far have failed :( :

[Broken External Image]:http://www.talbotech.com/bindIcons.jpg

I was hoping that someone might know. Please reply as soon as possible. This is driving me mad! :mad:
 
I dont know, and this may not work, but could you set the icon you want the .fol file to have as the default icon for your project in the designer, and then at runtime load a different one into the program as the one to display from a res file?
 
I dont know about 2005, but in VS 2003 you could open up all win32 EXEs (even .Net exes after compilation) and edit resources, i.e. win32 resources as opposed to .Net resources, and add icons as well as other things.
 
marble_eater said:
I dont know about 2005, but in VS 2003 you could open up all win32 EXEs (even .Net exes after compilation) and edit resources, i.e. win32 resources as opposed to .Net resources, and add icons as well as other things.
Cool. Ill try that. Do you know if there is a way to add a resource at design time?
 
Not win32 resources, just .Net resources, which, again, wont show up in a resource editor, or windows icon picker, etc.
 
You can only edit resources in an assembly if its either unsigned or you can resign it, otherwise youre a bit scuppered. I use a native resources assembly (cunningly named %project%.NativeResources.dll) into which i build only a win32res .res file containing the icons bitmaps etc that i wish to be able to access directly from windows rather than managed code. I buil it either with a simply csc answerfile or an msbuild project and all i needed to do was provide the path to the .res file as the win32res parameter. How you create the .res file is up to you
 
Back
Top