Board index » delphi » Associating Delphi exe

Associating Delphi exe

Hi,
        I have written a windows notepad type application, as my first Delphi
project ever (Delphi 1), which seems to work fine. However I am
wondering why, when I associate the .exe with files such as .txt or
.pas, and then double click the .txt or .pas file, it opens my
application but WITHOUT bringing up the file loaded into the TMemo
window. Its probably something that needs to happen in the form create
procedure but I don't know what. Can anyone help please?
        One other small query, is there a way of counting the number of
'spaces' i.e no words in a TMemo component, as a way of performing a
rough word count?
        Thanks,
        Nicholas

P.S Thanks to various people who answered my previous postings about
Insert/Overwrite etc.

 

Re:Associating Delphi exe


Quote
N.A.Newble wrote:

> Hi,
>         I have written a windows notepad type application, as my first Delphi
> project ever (Delphi 1), which seems to work fine. However I am
> wondering why, when I associate the .exe with files such as .txt or
> .pas, and then double click the .txt or .pas file, it opens my
> application but WITHOUT bringing up the file loaded into the TMemo
> window. Its probably something that needs to happen in the form create
> procedure but I don't know what. Can anyone help please?
>         One other small query, is there a way of counting the number of
> 'spaces' i.e no words in a TMemo component, as a way of performing a
> rough word count?
>         Thanks,
>         Nicholas

> P.S Thanks to various people who answered my previous postings about
> Insert/Overwrite etc.

You need to explicitly load the file thats getting clicked on.  You'll
find the filename in ParamStr[1].  Look in the help file...

Other Threads