北京路思达:Delphi7中如何调用应用程序???

来源:百度文库 编辑:高校问答 时间:2024/05/05 19:34:03
就是在Delphi的某个过程中调用一个可以执行的EXE文件,执行这个EXE文件的功能。。。

ShellExecute()函数,参看MSDN

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
);

一般的调用
假如要调用的文件储存在字符串FileName里
例如
FileName:='C:\aaa.exe';
ShellExecute(nil,'open',PChar(FileName),nil,nil,SW_SHOW);

这个软件我没听说过...