View Full Version : i build a text editor and......
i build a text editor and my program save my files to *.yyy (the *.yyy is my file) how i do thet the user run "file.yyy" my programe is open automtic and can i change the icon of my file?.
exmple if i run file.doc the microsoft word is automatic open
Take a look at this thread:
http://www.indigorose.com/forums/showthread.php?t=17380
It will show you how to make changes to Windows registry to achieve what you need.
TJ_Tigger
10-02-2006, 08:42 AM
Just checking . . . . . . . . Yep the search function on the forums still works. bule you make a great search function too. :yes :D
but Tigg...
If I use that feature, I might get the answer right-away. Where's the fun in that? :yes
TJ_Tigger
10-02-2006, 09:27 AM
but Tigg...
If use that feature, I might get the answer right-away. Where's the fun in that? :yes
Oh yeah, Got to keep us forum fans in business. We have to earn our monies some how . . . oh yeah we don't get paid for watching the forums. Well not really but kinda we do. Great software for everyones. :D
the code is vary good but and the file is run my program but the icon dont cheng way? i send the program tp attach files.
function CreateFileAssociation(strApplicationPath, strFileExtension, strAppShortName, strIconFile)
Registry.SetValue(HKEY_CLASSES_ROOT, strFileExtension, "", strAppShortName);
local strCommandLine = "\""..strApplicationPath.."\" \"%1\"";
Registry.SetValue(HKEY_CLASSES_ROOT, strAppShortName.."\\shell\\open\\command", "", strCommandLine);
if(File.DoesExist(strIconFile))then
local strApp83path = File.GetShortName(strIconFile);
Registry.SetValue(HKEY_CLASSES_ROOT, strAppShortName.."\\DefaultIcon", "", strApp83path..",0");
end
end
local strApplication = "c:\\LND.exe"
CreateFileAssociation(strApplication, ".rrr", "c:\\LND.exe", "c:\\LND.exe,0") ;
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.