本文整理自网络,侵删。
delphi 实现打开文件定位
可以实现文件打开后定位到那个文件而且不执行它.
代码:
用shellExecute 打开一个文件夹,那如何打开一个文件夹并选中指定的文件呢。
下面一个函数就可以就可以做到:
filepath:='F:\手机相关\wince\Microsoft Pocket PC 2003 SDK.msi';
ShellExecute(0, nil, PChar('explorer.exe'),PChar('/e, '+ '/select, ' + filepath), nil, SW_NORMAL);
相关阅读 >>
Delphi setcurrentdir 设置当前文件夹路径
Delphi编写的android程序获取root权限实现(2015.4.15更新,支持android 4.4)
更多相关阅读请进入《Delphi》频道 >>