Posted by John Doe on January 17, 2003
In Reply to: Re: Howcan I make a program that have some COMMAND LINE options. posted
by John Doe on January 17, 2003
Second thought, this might be a little cleaner.
procedure TfrmMain.FormShow(Sender: TObject); var i: integer; begin {Check if need to load files from commandline} if ParamCount > 0 then for i := 1 to ParamCount do begin if FileExists(ParamStr(i)) then OpenFile(ParamStr(i)); end else begin FileNew.Execute; end; end;
Find related articles
Suggested keywords:
command line, pass parameters, application
parameters, shellexecute
DelphiLand Discussion Forum
|