请问dephi中如何实现调用另一可执行文件,请具体写出API函数,谢谢。

解决方案 »

  1.   

    winexec('MIME.exe', sw_shownormal);
      

  2.   

    shellexecute(handle,nil,'e:\project1.exe',nil,nil,sw_show);
      

  3.   

    uses shellapiShellExecute(Handle, 'open', PChar('notepad'),nil, nil, SW_SHOW);
      

  4.   

    这是我在CB中调用EXE的代码,你转化一下就可以了。void __fastcall TForm1::Button1Click(TObject *Sender)
    {
      
      const char* counter="H:\\学习\\MY PROGRAM\\c++ builder\\计算器\\counter.exe";
       ShellExecute(Handle,"open",counter,NULL,NULL,SW_SHOWNORMAL);
       Form1->Hide();
    }
      

  5.   

    winexec和
    ShellExecute都可以。