比较简单的有:INT WinExec( LPCSTR lpCmdLine, // address of command line UINT uCmdShow // window style for new application );WinExec('c:\windows\explorer.exe', sw_show);
UINT WinExec( LPCSTR lpCmdLine, // address of command line UINT uCmdShow // window style for new application );
UINT uCmdShow // window style for new application
);WinExec('c:\windows\explorer.exe', sw_show);
UINT uCmdShow // window style for new application
);
SW_MAXIMIZE
SW_MINIMIZE
SW_RESTORE
SW_SHOW SW_SHOWDEFAULT
SW_SHOWMAXIMIZED
SW_SHOWMINIMIZED
SW_SHOWMINNOACTIVE
SW_SHOWNA Displays
SW_SHOWNOACTIVATE
SW_SHOWNORMAL
WINEXEC//调用可执行文件
winexec('command.com /c copy *.* c:\',SW_Normal);
winexec('start abc.txt');
ShellExecute或ShellExecuteEx//启动文件关联程序
function executefile(const filename,params,defaultDir:string;showCmd:integer):THandle;
ExecuteFile('C:\abc\a.txt','x.abc','c:\abc\',0);
ExecuteFile('http://tingweb.yeah.net','','',0);
ExecuteFile('mailto:[email protected]','','',0);
Uses ShellAPI;
ShellExecute
具体可以查看Win32 SDK的Help
Uses ShellAPI;
ShellExecute