Commandline switches are also known as parameters.
if you got the RUN menu in the Delphi IDE, you will see a menu item alled
parameters.
In there you can specify the parameters you want for testing. i.e. /? for
help.
Then, in the OnFormCreate event of you project, you get the parameter by
using the Paramstr function.
Paramstr(0) is reserved for returning the applications name and path.
Paramstr(1) would in this cas be the /? and each parameter you add after
that is increased in number,
i.e. /? /r
paramstr(1) = ? paramstr(2) = r

Hope this helps.

Jeremy Coulter

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Jason Coley
Sent: Wednesday, July 19, 2000 4:10 PM
To: Multiple recipients of list delphi
Subject: [DUG]: Command line switches


How do I setup my Application to use a command line switch, or to be
able to click on a file type and have windows run my app?

Jason
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to