本文整理自网络,侵删。
delphi打开文件夹并定位到一个文件
用shellExecute 单元 打开一个文件夹,那如何打开一个文件夹并选中指定的文件呢。
下面一个函数就可以就可以做到:
filepath:='F:\123.txt';
ShellExecute(0, nil, PChar('explorer.exe'),PChar('/e,/select,'+ filepath), nil, SW_NORMAL);
相关阅读 >>
Delphi 2009 之 tstringbuilder 类[4]: insert 与 remove
Delphi 动态给combobox赋值,从combobox中取值
Delphi 从twebbrowser webbrowser得到全部html源码
Delphi application.restore; 简单用法
Delphi xe10 手机端错误提示:detected problems with api compatibility (visit g.co/dev/appcompat for more info
更多相关阅读请进入《Delphi》频道 >>