shellexecute(application.Handle,'open',PChar(runpath),nil,nil,SW_SHOWNORMAL);
比如我要打开c:\111.doc
你可以这样写
uses
shellapi
ShellExecute(handle, 'open','winword.exe', '111.doc', 'c:\', SW_SHOWNORMAL);
ShellExecute(handle, 'open','winword.exe', 'c:\111.doc', nil, SW_SHOWNORMAL);
或者干脆
ShellExecute(handle, 'open','c:\111.doc', nil, nil, SW_SHOWNORMAL);
你可以这样写
uses
shellapi
ShellExecute(handle, 'open','winword.exe', '111.doc', 'c:\', SW_SHOWNORMAL);
ShellExecute(handle, 'open','winword.exe', 'c:\111.doc', nil, SW_SHOWNORMAL);
或者干脆
ShellExecute(handle, 'open','c:\111.doc', nil, nil, SW_SHOWNORMAL);
本文详细介绍了如何在Delphi中利用ShellExecute函数打开指定路径的文件,通过具体代码实例展示了使用方法及应用效果。
1043

被折叠的 条评论
为什么被折叠?



