本文整理自网络,侵删。
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;
相关阅读 >>
d10环境下调用hidcontroller1.0.35获取数据乱码问题
Delphi getversionstring 获取文件版本信息
Delphi 用ini记录combobox的itemindex
更多相关阅读请进入《Delphi》频道 >>