进程窗口显示.. ( 积分: 10 )

  • 主题发起人 主题发起人 yonge23
  • 开始时间 开始时间
Y

yonge23

Unregistered / Unconfirmed
GUEST, unregistred user!
帮助看一下.谢谢先...<br> <br>var <br> &nbsp; &nbsp;SI: TStartupInfo;<br> &nbsp; &nbsp;PI: TProcessInformation;<br> <br>begin<br> &nbsp;FillChar(sI,sizeof(sI),#0);<br> &nbsp;sI.cb := SizeOf(sI); &nbsp; &nbsp; &nbsp;// CREATE_NEW_CONSOLE or<br> &nbsp;si.dwFlags:=STARTF_USESTDHANDLES; //or STARTF_USESTDHANDLES<br> &nbsp;SI.wShowWindow := SW_hide; &nbsp;<br> &nbsp;s:='cmd.exe /k C:/turboc2/tcc -exxx '+filename+'&gt;'+refilename;<br> &nbsp;//i:=ShellExecute(handle, 'open', PChar('command.com'), PChar(s), nil, SW_hide); --以前用这个DOS窗口不会显示出来.<br> &nbsp;CreateProcess(nil,pchar(s),nil,nil,false,NORMAL_PRIORITY_CLASS, nil, nil, sI, pI) ; &nbsp;--现在DOS窗口会显示出来.<br>end;<br><br>怎么使DOS窗口不显示出来, &nbsp; &nbsp;SI.wShowWindow := SW_hide; 这样不行吗!?
 
帮助看一下.谢谢先...<br> <br>var <br> &nbsp; &nbsp;SI: TStartupInfo;<br> &nbsp; &nbsp;PI: TProcessInformation;<br> <br>begin<br> &nbsp;FillChar(sI,sizeof(sI),#0);<br> &nbsp;sI.cb := SizeOf(sI); &nbsp; &nbsp; &nbsp;// CREATE_NEW_CONSOLE or<br> &nbsp;si.dwFlags:=STARTF_USESTDHANDLES; //or STARTF_USESTDHANDLES<br> &nbsp;SI.wShowWindow := SW_hide; &nbsp;<br> &nbsp;s:='cmd.exe /k C:/turboc2/tcc -exxx '+filename+'&gt;'+refilename;<br> &nbsp;//i:=ShellExecute(handle, 'open', PChar('command.com'), PChar(s), nil, SW_hide); --以前用这个DOS窗口不会显示出来.<br> &nbsp;CreateProcess(nil,pchar(s),nil,nil,false,NORMAL_PRIORITY_CLASS, nil, nil, sI, pI) ; &nbsp;--现在DOS窗口会显示出来.<br>end;<br><br>怎么使DOS窗口不显示出来, &nbsp; &nbsp;SI.wShowWindow := SW_hide; 这样不行吗!?
 
看MSDN搞定.<br>var <br> &nbsp; &nbsp;SI: TStartupInfo;<br> &nbsp; &nbsp;PI: TProcessInformation;<br> <br>begin<br> &nbsp;FillChar(sI,sizeof(sI),#0);<br> &nbsp;sI.cb := SizeOf(sI); &nbsp; &nbsp; &nbsp;// CREATE_NEW_CONSOLE or<br> &nbsp;si.dwFlags:=STARTF_USESTDHANDLES or STARTF_USESHOWWINDOW; //or STARTF_USESTDHANDLES<br> &nbsp;SI.wShowWindow := SW_hide; &nbsp;<br> &nbsp;s:='cmd.exe /k C:/turboc2/tcc -exxx '+filename+'&gt;'+refilename;<br> &nbsp;//i:=ShellExecute(handle, 'open', PChar('command.com'), PChar(s), nil, SW_hide); --以前用这个DOS窗口不会显示出来.<br> &nbsp;CreateProcess(nil,pchar(s),nil,nil,false,NORMAL_PRIORITY_CLASS, nil, nil, sI, pI) ; &nbsp;--现在DOS窗口会显示出来.<br>end;
 
后退
顶部