Search results for 'ParamCount'. 1 post(s) found.
- 2009/06/30 How to get parameter string ?
Just like main(Argv,Argc) in C, Delphi also has the similar variables to get Parameter String coming from command line.
Following is the simple example to display parameter list by showmessage function.
procedure TMainFrm.Button3Click(Sender: TObject);
var i: Integer;
begin
for i := 1 to ParamCount do
ShowMessage( ParamStr(i));
end;
var i: Integer;
begin
for i := 1 to ParamCount do
ShowMessage( ParamStr(i));
end;
As you can see above, you can know the total number of parameters by ParamCount. In addition, You can get the Parameter String by ParamStr function as well.
Another posts included in "Delphi"
| How to return exit code such as exit() function in C/C++ ? (0) | 2009/07/02 |
| How to send email by TIdSMTP VCL ? (0) | 2009/07/07 |
| Base64 Encoding/Decoding function for Delphi (0) | 2009/07/16 |
| Save TBitmap image to Jpeg format image in Delphi (0) | 2009/06/26 |
| How to get screen resolution in case of using multiple monitors ? (0) | 2008/12/16 |
| How to turn off monitor ? (0) | 2008/12/10 |
| Find File at certain directory in Delphi (0) | 2008/10/10 |
| Sending email messages in .Net (0) | 2007/10/04 |

Prev

Rss Feed