求教高人:createprocess 调用外部程序,怎样才能隐藏任务栏图标? ( 积分: 47 )

  • 主题发起人 主题发起人 steelg
  • 开始时间 开始时间
S

steelg

Unregistered / Unconfirmed
GUEST, unregistred user!
外部程序的窗口是可以隐藏,但任务栏上会显示所调用的外部程序的图标,设置哪个参数能使任务栏的图标也隐藏起来?<br><br>相关代码见下:<br>&nbsp;&nbsp;&nbsp;lpStartupInfo.dwFlags&nbsp;:=&nbsp;STARTF_USESHOWWINDOW;<br>&nbsp;&nbsp;&nbsp;lpStartupInfo.wShowWindow&nbsp;:=&nbsp;SW_HIDE;<br>&nbsp;&nbsp;&nbsp;setcurrentdir(dpath);<br>&nbsp;&nbsp;&nbsp;bCreateProcess&nbsp;:=&nbsp;CreateProcess(nil,PChar('cmd&nbsp;/c&nbsp;&quot;tecplot&nbsp;-b&nbsp;-p&nbsp;onedimensionmacro.mcr&quot;'),nil,nil,True,HIGH_PRIORITY_CLASS,&nbsp;nil,nil,lpStartupInfo,&nbsp;lpProcessInformation);<br>&nbsp;&nbsp;&nbsp;if&nbsp;bCreateProcess&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WaitForSingleObject(lpProcessInformation.hProcess,INFINITE);<br><br>只有47分了,全部送出
 
ShowWindow(Application.Handle,&nbsp;SW_HIDE);
 
刚才发错了<br>SetWindowLong(Application.Handle,&nbsp;GWL_EXSTYLE,&nbsp;WS_EX_TOOLWINDOW);<br>这个可以
 
这个好像不是针对调用外部程序的?
 
SetWindowLong(Application.Handle,&nbsp;GWL_EXSTYLE,&nbsp;WS_EX_TOOLWINDOW);&nbsp;&nbsp;这个是隐藏程序程序在任务栏&nbsp;&nbsp;&nbsp;不是托盘的
 
FillChar(StartUpInfo,&nbsp;SizeOf(StartUpInfo),&nbsp;$00);<br>StartUpInfo.dwFlags&nbsp;:=&nbsp;STARTF_USESHOWWINDOW;<br>StartUpInfo.wShowWindow&nbsp;:=&nbsp;SW_Hide;<br>if&nbsp;CreateProcess(nil,&nbsp;PChar(BatchFileName),&nbsp;nil,&nbsp;nil,<br>False,&nbsp;IDLE_PRIORITY_CLASS,&nbsp;nil,&nbsp;nil,&nbsp;StartUpInfo,<br>ProcessInfo)&nbsp;then<br>以前看到一个例子,关于程序自杀的,上面有这样一段,应该有你需要的....
 
to&nbsp;kuer6983<br><br>试验过了,不行!
 
to&nbsp;ysp<br><br>那你知道如何隐藏任务栏图标吗?谢谢!
 
http://www.bention.com/article.asp?id=154&nbsp;&nbsp;看看这个对你有帮助吗?
 
后退
顶部