Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 don't have to include a seperate icon file with the assembly. Like the way Dreamweaver has it's icons all its main assembly:

 

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 :( :

 

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:

Posted
I don't 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?

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

  • Leaders
Posted
I don't 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.
[sIGPIC]e[/sIGPIC]
Posted
I don't know about 2005' date=' 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.[/quote']

Cool. I'll try that. Do you know if there is a way to add a resource at design time?

Posted
You can only edit resources in an assembly if its either unsigned or you can resign it, otherwise you're 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...