问题:如何执行外部程序 ( 积分:50, 回复:3, 阅读:29 )<br>分类:Windows API ( 版主:amo, cAkk ) <br>来自:cao192, 时间:2001-12-25 14:48:00, ID:811264 [显示:小字体 | 大字体] <br>执行外部EXE文件<br> <br> <br>来自:卷起千堆雪tyn, 时间:2001-12-25 14:53:00, ID:811277 <br>uses ShellAPI;<br><br>ShellExecute(GetDesktopWindow, 'open', '你的外部应用程序的路径', nil, nil, 0);<br><br><br><br> <br> <br>来自:free_knight, 时间:2001-12-25 14:57:00, ID:811301 | 编辑 <br>uses WinProcs; <br> ..... <br>begin <br> WinExec(......); <br>.......... <br>end. <br><br>和调用Pascal库函数没什么两样。<br> <br>例如:<br>WinExec('c:/windows/calc.exe',SW_SHOWNORMAL); //启动计算器<br>函数原型为:<br>UINT WinExec(<br>LPCSTR lpCmdLine, // address of command line <br>UINT uCmdShow // window style for new application <br>); <br><br> <br> <br>来自:cao192, 时间:2001-12-25 15:22:00, ID:811367 <br>多人接受答案了<br> <br> <br>