Delphi7中如何调用应用程序???
展开全部
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);
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);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询