rocedure TForm1.Button1Click(Sender: TObject);
var I : Integer;
begin
for I := 0 to ParamCount do
Label1.Caption := ParamStr(I);
Label2.Caption := IntToStr(ParamCount);
end;
If you type 'Project1 /p' (without the quotes in DOS or
put it in the programs Properties -> Shortcut -> Target, like this
"C:\Delphi 3\BIN\examples\Project1.exe" /p)
This is what you get:
Label1 = /p
Label2 = 1
This is one of the Delphi help files examples:
procedure TForm1.Button2Click(Sender: TObject);
var I : Word; Y : Integer;
begin
Y := 10;
for I := 0 to ParamCount do
begin
Canvas.TextOut(5, Y, ParamStr(I));
Y := Y + Canvas.TextHeight(ParamStr(I)) + 5;
end;
And this is what you get from this example:
C:\Delphi 3\bin\examples\Project1.exe