winexec或其他api隐藏着打开一个外部程序,如何做? 就是不让外部程序的窗体show出来,而是hide掉!操作系统是win2000winexec(filename,SW_HIDE);试了,但是不行.showWindow(Handle,SW_HIDE);试了,也不行!!请大家指教! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 uses shellapi ;ShellExecute(handle, NULL, path_to_folder, NULL, NULL, SW_SHOWNORMAL);or ShellExecute(handle, "open", path_to_folder, NULL, NULL, SW_SHOWNORMAL); To explore a folder, use the following call:ShellExecute(handle, "explore", path_to_folder, NULL, NULL, SW_SHOWNORMAL); zfmich():ShellExecute(0,'Open',PChar(Filename),nil,nil,SW_HIDE);不行!ShellExecute(0,NULL,PChar(Filename),nil,nil,SW_HIDE);错误我想隐藏,在后台打开它!thanks code like this:var lpStartInfo: TStartupInfo; lpPi: TProcessInformation;begin FillChar(lpStartInfo,sizeof(lpStartInfo),0); lpStartInfo.cb := sizeof(lpStartInfo); lpStartInfo.dwFlags := STARTF_USESHOWWINDOW ; lpStartInfo.wShowWindow := SW_NORMAL{HIDE}; if CreateProcess(nil,'notepad',nil,nil,false, NORMAL_PRIORITY_CLASS,nil,nil,lpStartInfo,lpPi) then CloseHandle(lpPi.hProcess); WaitForSingleObject(lpPi.hProcess,10000);end; winexec落后了,一般不要用。winexecuteEx这个函数比winexecute好,能得到打开的程序的进程句柄。 windows关机效果 dbgrideh的UpdateData事件中如何更新数据集? 我公司想代理一套酒店管理系统,大家帮忙推荐一下。 高分求解~~~~怎么用ADOQUERY 把excel中的数据导如到SQL SERVER 2000中?~~~~~~~~在线等待 巨分求助关于打印的问题 大家讨论web开发! 哪里有delphi6 SP2 下载? 高分求购stringgrid打印程序代码 报表页码统计问题 这个SQL语句怎么写?怎么替换出变量的值? 小小问题,请多帮忙 在抓图是怎样还mouse的指针一起抓?
ShellExecute(handle, "open", path_to_folder, NULL, NULL, SW_SHOWNORMAL);
To explore a folder, use the following call:ShellExecute(handle, "explore", path_to_folder, NULL, NULL, SW_SHOWNORMAL);
ShellExecute(0,NULL,PChar(Filename),nil,nil,SW_HIDE);错误我想隐藏,在后台打开它!thanks
var
lpStartInfo: TStartupInfo;
lpPi: TProcessInformation;
begin
FillChar(lpStartInfo,sizeof(lpStartInfo),0);
lpStartInfo.cb := sizeof(lpStartInfo);
lpStartInfo.dwFlags := STARTF_USESHOWWINDOW ;
lpStartInfo.wShowWindow := SW_NORMAL{HIDE};
if CreateProcess(nil,'notepad',nil,nil,false,
NORMAL_PRIORITY_CLASS,nil,nil,lpStartInfo,lpPi) then
CloseHandle(lpPi.hProcess);
WaitForSingleObject(lpPi.hProcess,10000);
end;
winexecuteEx这个函数比winexecute好,能得到打开的程序的进程句柄。