Solved

Get Command Line Options

Posted on 2000-04-01
2
136 Views
Last Modified: 2010-04-04
How could I get commandline options for example if I was to run my program like this

project.exe /a /s

how could I get the /a and /s?
0
Comment
Question by:nafa2221
  • 2
2 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 2677324
ParamStr(1) and ParamStr(2)

If you want to know the number of passed parameters use ParamCount

Azzoz
0
 
LVL 7

Accepted Solution

by:
Motaz earned 50 total points
ID: 2677329
If you want to display all parameters in a memo do this:

- Drop a Memo
- Drop a Button and write this code in it's OnClick event:

var
  i: Integer;
begin
  Memo1.Clear;
  for i:= 1 to ParamCount do
   Memo1.Lines.Add(ParamStr(i));
end;

Motaz
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now