怎样在delphi代码运行exe文件,如运行记事本,在线等待

解决方案 »

  1.   

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

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
       WinExec('notepad.exe',SW_SHOW);
    end;
      

  3.   

    winexec ('路径',sh_show);
      

  4.   

    为什么大家都说WinExec()?这个API已经被淘汰了,这是为了兼容16位代码而保留的,32位代码应该调用CreateProcess()这个API。
      

  5.   

    ShellExecute(Handle,"Open",ch,0,0,SW_SHOW)
      

  6.   

    ShellExecute(Handle,'open',PChar(Edit1.Text),'','',SW_SHOWNORMAL);
      

  7.   

    想运行什么自己写到TEDIT里去吧,(除了没有关联程序的文件外)