本文整理自网络,侵删。
打开"我的电脑"等特殊文件夹
uses ShellAPI;
//打开 C 盘
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'Explorer.exe', 'C:\', nil, SW_SHOWNORMAL);
end;
//打开 我的电脑
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'Explorer.exe',
'::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', nil, SW_SHOWNORMAL);
end;
//打开 资源管理器
procedure TForm1.Button3Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'Explorer.exe',
'/e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', nil, SW_SHOWNORMAL);
end;
相关阅读 >>
Delphi removeinvalid截取字符串某个字符前面的字符
Delphi xe(indy10)tidbytes转ansistring的实现
python4Delphi 示例应用程序在 Delphi 应用程序中运行简单的 python 脚本
Delphi 2009 indy10 idhttp get 中文出现乱码的问题
更多相关阅读请进入《Delphi》频道 >>