C cat.yy Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-21 #1 就象DOS下的可带参数的命令一样,<br>怎么实现的,<br>说说原理也行(最好有个例子,嘿嘿)
少 少爷的拐杖 Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-21 #2 procedure TForm1.FormCreate(Sender: TObject);<br>var s:string;<br>begin<br>if paramcount>0 then<br>s:=paramstr(1);<br>showmessage(s);<br>end;
procedure TForm1.FormCreate(Sender: TObject);<br>var s:string;<br>begin<br>if paramcount>0 then<br>s:=paramstr(1);<br>showmessage(s);<br>end;
C cgh0717 Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-21 #3 procedure TForm.FormShow(Sender:TObject);<br>var NwwTitle:String;<br>begin<br>if paramcount>0 then<br>NewTitle:=paramstr(1);<br>Caption:=NewTitle;//paramstr(0)是程序所在的路径<br>end;
procedure TForm.FormShow(Sender:TObject);<br>var NwwTitle:String;<br>begin<br>if paramcount>0 then<br>NewTitle:=paramstr(1);<br>Caption:=NewTitle;//paramstr(0)是程序所在的路径<br>end;
C CHENGHAO Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-21 #4 比如你的程序叫:project1.exe<br>然后你调用:project1.exe a b<br>则paramcount=2<br> paramstr[1]=a<br> paramstr[2]=b<br>paramstr,paramcount在系统中已经预先定义,自己不用定义。直接调用接可以了。<br>
比如你的程序叫:project1.exe<br>然后你调用:project1.exe a b<br>则paramcount=2<br> paramstr[1]=a<br> paramstr[2]=b<br>paramstr,paramcount在系统中已经预先定义,自己不用定义。直接调用接可以了。<br>