我的系统需要调用window其他执行程序,如何调用?

解决方案 »

  1.   

    HINSTANCE ShellExecute(    HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );
      

  2.   

    UINT WinExec(    LPCSTR lpCmdLine, // address of command line 
        UINT uCmdShow  // window style for new application 
       );
      

  3.   

    WinExec是一个过时的函数,尽管MS还保留了它.
    CreateProcess参数有点复杂.
    ShellExecute(NULL,'open',文件路径,参数,执行目录,窗口状态)不错,就是它了.
      

  4.   

    给你个例子
      ShellExecute(application.MainForm.Handle,nil,'http://www.zqsoft.com',nil,nil,SW_SHOWNORMAL)把'http://www.zqsoft.com'换成你要执行的文件就可以了
    不行的话就加入shellapi