WindowsAPI - shellexecute

微笑、不失礼 提交于 2019-11-29 09:57:55
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);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!