关于应用程序的参数(50分)

  • 主题发起人 主题发起人 vcl&delphi
  • 开始时间 开始时间
V

vcl&delphi

Unregistered / Unconfirmed
GUEST, unregistred user!
请教各位Delphi专家<br>&nbsp; &nbsp; 在C语言中应用程序的参数在main()函数中可是设置,在Delphi中怎样设置应用程序的参数<br>&nbsp; 请专家指点
 
The following example beeps once for each 揵eep?passed in on the command line. The example terminates the application if &nbsp;揺xit?is passed in on the command line.<br><br>procedure TForm1.FormCreate(Sender: TObject);<br><br>var<br>&nbsp; i: Integer;<br>&nbsp; for i := 0 to ParamCount -1 do<br>&nbsp; begin<br>&nbsp; &nbsp; if LowerCase(ParamStr(i)) = 'beep' then<br>&nbsp; &nbsp; &nbsp; Beep(10000,1000)<br>&nbsp; &nbsp; else if (LowerCase(ParamStr(i)) = 'exit' then<br>&nbsp; &nbsp; &nbsp; Application.Terminate;<br>&nbsp; end;<br>end;<br>
 
function ParamStr(Index: Integer): string;<br>function ParamCount: Integer;
 
vcl&amp;delphi好象只进来过一次,给它结束了吧.
 
把TAPPLICATION类搞清楚很有好处!
 
接受答案了.
 
后退
顶部