rt

解决方案 »

  1.   

    how ?
    大侠,请说清楚一点,谢谢,最好一个小例子,万分感谢~
      

  2.   

    procedure TForm1.FormCreate(Sender: TObject);var
      i: Integer;
      for i := 1 to ParamCount do
      begin
        if LowerCase(ParamStr(i)) = 'beep' then
          Beep
        elseif LowerCase(ParamStr(i)) = 'exit' then
          Application.Terminate;
      end;
    end;
      

  3.   

    function ParamCount: Integer;
    Returns the number of parameters passed on the command line.
    返回参数个数。function ParamStr(Index: Integer): string;
    Returns a specified parameter from the command-line.
    返回参数的内容ParamStr(0) <----当前程序名称。
    ParamStr(1) <----取第一个参数,依次类推。