0
点赞
收藏
分享

微信扫一扫

Doscommand

var
  s: string;
begin
  if key = #13 then
  begin
    memo1.Lines.Clear;
    s := edit1.Text;
    memo1.Lines.Add('当前命令  '+s+'  返回结果');
    memo1.Lines.Add('');   Doscommand1.CommandLine := 'cmd /c' + s;
    Doscommand1.OutputLines := Memo1.Lines;
    doscommand1.Execute;
    edit1.Text := '';
    StatusBar1.Panels[0].Text:='当前执行的命令是:  '+s;
  end;
end;


 

DosCommand  下载 http://maxxdelphisite.free.fr/doscmd.htm

DosCommand.pas安装
Component → Install Component 弹出安装控件(PAS单元)对话框,最好选择into new package,然后选择Browse..
按钮,在弹出的打开对话框中选择DosCommand.pas单元,然后取一个PACKAGE文件名,比如package_doscommand,然后按 OK 就可以了,然后它提问是否continue,选择YES,这时在SAMPLES里会有一个DOSCOMMAND控件生成

 

Doscommand_cmd

 

举报
0 条评论