HasParamStr function
String / Filename routines |
![]() ![]() ![]() |
acUtils
|
function HasParamStr(const Param: String): Boolean;
|
The HasParamStr function used to check whether the application was executed with some command-line argument (Param parameter). It returns True if the parameter found within command line arguments, or False otherwise.
|
// code from Loaded method of acTrayIcon component.
|
if HasParamStr('/minimized') then
|
StartMinimized := True;
|
function HasParamStr(const Param: String): Boolean;
|
var
|
I: Integer;
|
begin
|
if ParamCount <> 0 then
|
for I := 1 to ParamCount do
|
if AnsiLowerCase(ParamStr(I)) = AnsiLowerCase(Param) then
|
begin
|
Result := True;
|
Exit;
|
end;
|
Result := False;
|
end;
|