Associating a file extension to my application

Posted on 2005-04-11
Last Modified: 2010-04-05
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.

Question by:HamidHossain
    LVL 6

    Accepted Solution

    the filename is passed through the command-line. you can access it throught the Params() function.

    Author Comment

    This did the job


    Thanks pritaeas


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now