multiple icons in one exe
I'm making a program that associates itself with two different file types, and would like to use a different icon for each type. How do i make the program store both icons, and then access them?
i am using the registry API setKeyValue to set the defaulticon for each type... the line
App.Path & "\" & App.EXEName & ".exe,0"
will access the program's main icon, but when i add more icons to the program and attempt to change the 0 to any other icon index the file type's icon becomes the default for windows, indicating the icon evidently could not be found.
any help is greatly appreciated, i am trying to keep this all one .exe because it is a small time program, otherwise i would add a resource file.
use a ressource file in you project, you can load icons from it with this cammand
LoadResPicture (index, Format)
0 = VbResBitmap
1 = VbResIcon
2 = VbResCursor
when compiled the .res is included in your app, then when you set the icon to 1 it'll load the icon at index 1 in your app instead of reverting to windows default.
hope it helps
ahh ok... everywhere i looked the way they worded things implied that i would have to have a .res file along with the .exe and give both to everyone, i was not aware that the .res was included... *smacks head* doh and i didnt try it before.
thanks very much!