|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
use a ressource file in you project, you can load icons from it with this cammand
LoadResPicture (index, Format) 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 |
|
#3
|
|||
|
|||
|
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! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > multiple icons in one exe |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|