就是不让外部程序的窗体show出来,而是hide掉!操作系统是win2000winexec(filename,SW_HIDE);试了,但是不行.
showWindow(Handle,SW_HIDE);试了,也不行!!请大家指教!

解决方案 »

  1.   

    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);
      

  2.   

    zfmich():ShellExecute(0,'Open',PChar(Filename),nil,nil,SW_HIDE);不行!
    ShellExecute(0,NULL,PChar(Filename),nil,nil,SW_HIDE);错误我想隐藏,在后台打开它!thanks
      

  3.   

    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;
      

  4.   

    winexec落后了,一般不要用。
    winexecuteEx这个函数比winexecute好,能得到打开的程序的进程句柄。