用winexec调用cls命令就行了,Winexec('cmd /c cls', SW_HIDE);<br><br>下面这个程序模拟cmd环境,当然有些命令是执行不了的<br><br>program Project1;<br><br>{$APPTYPE CONSOLE}<br><br>uses<br> SysUtils, Windows;<br><br>var<br> S: string;<br>begin<br> repeat<br> Readln(S); //读取Dos命令<br> Windows.WinExec(PChar('cmd /c ' + S), SW_HIDE); //调用cmd.exe执行该命令<br> until LowerCase(S) = 'exit'; //如果是exit就结束程序了<br>end.