DELPHI中怎样调用其他程序? 要用语句啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 shellapi 中的WinExecwindows 中的CreateProcess WinExec和ShellAPI的ShellExecute 启动外部程序并等待它结束 启动外部程序我们可以使用函数Winexec、ShellExecute和ShellExecuteEx。我推荐大家使用函数ShellExecute,因为它既灵活,又简单。看看下面的例子,用法就清楚了:*: 启动一个程序ShellExecute(Handle,'open',PChar('c:\test\app.exe'),nil,nil,SW_SHOW);Winexec(pchar(edit1.text),sw_restore);* 启动记事本 (因为记事本在系统路径下,所以不必写完整的路径名了):ShellExecute(Handle, 'open', PChar('notepad'),nil, nil, SW_SHOW);* 启动记事本并加载一个纯文本文件:ShellExecute(Handle, 'open', PChar('notepad'),PChar('c:\test\readme.txt', nil, SW_SHOW);* 使用记事本打开一个纯文本文件 (请确定*.txt文件被关联到记事本):ShellExecute(Handle, 'open', PChar('c:\test\readme.txt'),nil, nil, SW_SHOW);* 使用默认浏览器打开网址:ShellExecute(Handle, 'open', PChar('http://www.festra.com/'),nil, nil, SW_SHOW);* 打印一个文件:ShellExecute(Handle, 'print', PChar('c:\test\readme.txt'),nil, nil, SW_SHOW);* 用Windows Explorer打开一个文件夹:ShellExecute(Handle, 'explore', PChar('c:\windows)',nil, nil, SW_SHOW);* 运行一个DOS命令并立即返回:ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c copy file1.txt file2.txt'), nil, SW_SHOW);* 运行一个DOS命令并保持DOS窗口打开 ("stay in DOS"):ShellExecute(Handle, 'open', PChar('command.com'), PChar('/k dir'), nil, SW_SHOW);--调用外部EXE文件--uses WinProcs; . begin Winexec(pchar(edit1.text),sw_restore);. end. use shellapi;ShellExecute(); snopyli(史努比) + jackie168(星星知我心) snopyli(史努比) + jackie168(星星知我心) locate参数问题 delphi for net 如何制作报表? 关于Ocx,Dll Active 控件的卸载???? 请问高手:如何用TWAIN设备自动拍照或扫描? 关于网络游戏的一点看法。 一个专业级问题!高手请进!指点一二! 如何将数据写入已经画好的word表格的相应位置上,并且该表格并不规范 CRYSTL REPORTS 水晶报表 在delphi可以用吗? vb调用delphi的dll问题啊 在delphi中如何用sql把某个库的数据备份成数据文件(txt或doc文件)?? 这件事情让我郁闷! 怎么遍历一个目录里面所有的文件?
ShellAPI的ShellExecute
.
begin
Winexec(pchar(edit1.text),sw_restore);
.
end.
ShellExecute();