Associating a file extension to my application

Hi All,

I am working in a text editor application. I want my exe to be able to handle set of file extensions. for example: *.txt and *.pas files.

What I wanted to do is that if someone double-clicked any file with the extension of *.txt from windows explorer, then my exe will run and open that file.

I can associate the *.txt extension to be linked with my exe throu' windows explorer. But I am unable to get that file name as soon as my exe fires.

Regards,
Hamid
HamidHossainAsked:
Who is Participating?
 
pritaeasConnect With a Mentor Software EngineerCommented:
the filename is passed through the command-line. you can access it throught the Params() function.
0
 
HamidHossainAuthor Commented:
This did the job

ShowMessage(ParamStr(1));

Thanks pritaeas

Hamid
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.