Delphi中怎么执行外部的EXE程序?

解决方案 »

  1.   

    uses shellapi;ShellExecute(handle,'open','mspaint.exe',nil,nil,sw_shownormal);
      

  2.   

    WinExec('NotePad.exe', SW_SHOWNORMAL);
      

  3.   

    WinExec
    ShellExecute
    CreateProcesshttp://lysoft.7u7.net
      

  4.   

    用这两个吧
    WinExec
    ShellExecute
      

  5.   

    WinExec('NotePad.exe', SW_SHOWNORMAL);
      

  6.   

    方法一:
        uses WinProcs;
           ......
        begin
          WinExed(......);
          ......
        end;
    方法二:
        uses ShellAPI;
            ......
        begin
          ShellExecute(handle,'Open','C:\MyApp.exe','-S','',SW_ShowNormal);
          {第一个参数为父窗口的句柄;
           第二个参数为打开方式(Open,Print两种);
           第三个参数为文件全路径;
           第四个参数为执行文件的参数;
           第五个参数为执行文件开始运行时的初始目录;
           第六个参数为执行文件运行方式(SW_Hide,SW_Minimize,SW_Restore,SW_Show,SW_ShowDefault,SW_Maximized,SW_ShowMinimize,SW_ShowMinNoActive,SW_ShowNo,SW_ShowNoActivate,SW_ShowNormal)。}
          ......
        end;
      

  7.   

    方法好多呀
    shellexecute
      

  8.   

    WinExec已经不被推荐了
    还是用
    ShellExecute
      

  9.   

    这么点分100个人来分啊。SHELLEXECUTE有时执行不了的,WINEXEC可以
      

  10.   

    http://community.csdn.net/Expert/topic/3380/3380241.xml?temp=.2008783
      

  11.   

    win16
    -- WinExec
    win32
    -- WinExec
    -- ShellExecute
    -- CreateProcess