Please read this wiki (http://wiki.lazarus.freepascal.org/Code_Conversion_Guide#Packaging_and_Releasing_your_component) page and create a page for the component, if you didn't do it yet. That is all you have to do for adding to Lazarus-CCR. If you wish I can upload it the SF site of Lazarus-CCR too.Ok I'll create the page.
Great, Lainz, thanks a lot!
LGPL (The same as Lazarus).Are you sure you don't want to change that to:
Modified LGPL (The same as Lazarus).?
@LovelyA72
You can find it in OPM.
@lainz,
Thanks a lot for this component, but could another example be provided, showing how an application can effectively open an associated file when the user clicks upon the file icon? I presume some code for treating the program execution parameter need to be write, but this is not clear from the available documentation for the component.
Thanks in advance for any assistance you can provide.
Best wishes,
Unfortunately, it still does not work. When I click on an associated file, Windows Explorer asks for the application to be used to open it.
I have the Action property set to '"fde.exe" "%1"', where fde.exe is my application executable. I suppose this line, along with the code you provided, should do the trick, but it does not. In fact, the test of ParamCount > 0 returns False!
Any hints?
Best regards,
@lainz,
Thanks again for your prompt reply.
I had already suspected that a full path was needed, but in fact that is not the only problem I am running into. It happens that no parameter is being passed to my application, therefore the expression below:
if ParamCount > 0 then begin s := ParamStr(1); if ExtractFileExt(s) = '.dtz' then LoadFile(s); end;
always evaluates as False, even if I hardcode the full pathname in the Action property:
FileAssociation1.Action := "C:\Users\mauro\My Documents\Projetos\FreeDELTA\fde.exe" "%1"
Best regards,