-
Hi
You all alredy saw that when you save something on word, excell, etc. the file has a icon, well i made a program that save files with the extencion .fac and i want to see i icon that i chosed to appear when i´m working on explorer, like the .doc is related to word projects and .xls are related to excell i whant to register a icon to my .fac files.
How can i do this.
by the way some code could help me alot.
numibesi
-
You need to create an icon first. After that, I think the only way to do it WITHOUT using the registry is to manually go into the Folder Opions (Start > Settings > Folder Options) go to your fac extension or create it, and assign the icon to it. It's straight forward once you are in the Folder Options.
-
I want the reg code
Hi again.
But what i realy want is the code to register my extencion on the computer registry.That thing Hkey....
numibesi
-
Ohhhhhhh, so it's sort of a program which you distribute?!?!?
I'm not sure which registry setting to edit because I found about 3 directories in the registry which contain a FAT stash of extentions.
Search this site for "Assossiate files"
should work.
-
Here's the code I use
These are registry entries. For registry code look on any code library (like here). Probably if you look file associations code you'll find the same or better thing in ready to use code. These are just all registry entries.
If you create the association through the View, File Types in the Explorer and use an unique name, just search through the registry to find all keys with the unique name and you have all registry entries you must create to let it work.
'edit flags
procCreateNewKey sExtFile, HKEY_CLASSES_ROOT
procSetKeyValue sExtFile, "EditFlags", "0000", REG_DWORD
'default icon
procCreateNewKey sExtFile & "\DefaultIcon", HKEY_CLASSES_ROOT
procSetKeyValue sExtFile & "\DefaultIcon", "", IconFileLocation,IconPositionInFile", REG_SZ
'shell
procCreateNewKey sExtFile & "\Shell", HKEY_CLASSES_ROOT
procSetKeyValue sExtFile & "\Shell", "", "", REG_SZ
'shell open
procCreateNewKey sExtFile & "\Shell\Open", HKEY_CLASSES_ROOT
procSetKeyValue sExtFile & "\Shell\Open", "", "", REG_SZ
'shell open command
procCreateNewKey sExtFile & "\Shell\Open\command", HKEY_CLASSES_ROOT
procSetKeyValue sExtFile & "\Shell\Open\command", "", YourExecutable %1", REG_SZ
-
That exp don´t work
Please help me out, bacause i don´t know yet nothig about registering on regedit.
numibesi