View Full Version : my own extention for files create using my app
is it possible to make windows automatically set an icon for a certain file extention which was created using my application And make my application the default program for these file types but i wont to tale to the program where is the file?
if i click the file in "c:\windows\file.exe" i wish to change the lable to "c:\windows\file.exe" can it's possibly?
Dermot
10-04-2006, 02:45 PM
Try this.
http://www.indigorose.com/forums/showthread.php?t=17380
i wont to tale to the program where is the file?
if i click the file in "c:\windows\file.exe" i wish to change the lable to "c:\windows\file.exe" can it's possibly?
if i click on *.doc the "winword" open the doc and you see the file but in you link you can click the file then the program automatic open but the file how i know wer is the file if i wont to work whit the file i clicked?
Dermot
10-04-2006, 05:07 PM
if i click the file in "c:\windows\file.exe" i wish to change the lable to "c:\windows\file.exe" can it's possibly?
You lost me there.
if i click on *.doc the "winword" open the doc and you see the file but in you link you can click the file then the program automatic open but the file how i know wer is the file if i wont to work whit the file i clicked?
Once you have set the association, when you double-click the file, it's name and full path are passed to your app as _CommandLineArgs. This means you can grab the name of the file when you app starts up and do what ever you want with it.
Lets say your app was a text editor. You could use the following to load the text file that was double-clicked, into an input object
Put this in the OnLoad event of a page.
if _CommandLineArgs[1] then
if String.Left(_CommandLineArgs[1], 3) ~= "SFX" then
YourFile = _CommandLineArgs[1]
sText = TextFile.ReadToString(YourFile)
Input.SetEnabled("input1", sText)
end
end
i dont anderstend the code but its work very good thens:)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.