本文整理自网络,侵删。
delphi打开文件夹并定位到一个文件
用shellExecute 单元 打开一个文件夹,那如何打开一个文件夹并选中指定的文件呢。
下面一个函数就可以就可以做到:
filepath:='F:\123.txt';
ShellExecute(0, nil, PChar('explorer.exe'),PChar('/e,/select,'+ filepath), nil, SW_NORMAL);
相关阅读 >>
更多相关阅读请进入《Delphi》频道 >>
本文整理自网络,侵删。
delphi打开文件夹并定位到一个文件
用shellExecute 单元 打开一个文件夹,那如何打开一个文件夹并选中指定的文件呢。
下面一个函数就可以就可以做到:
filepath:='F:\123.txt';
ShellExecute(0, nil, PChar('explorer.exe'),PChar('/e,/select,'+ filepath), nil, SW_NORMAL);
相关阅读 >>
更多相关阅读请进入《Delphi》频道 >>
管理员已关闭评论功能...