Zobrazenie špeciálneho adresára
Niektoré adresáre vo Windowse nemajú svoju cestu ale aj tak sa dajú otvoriť.
Možné hodnoty:
- CSIDL_Desktop - plocha
- CSIDL_Controls - Control Panel
- CSIDL_Printers - tlaciarne
- CSIDL_Personal - Moje dokumenty
- CSIDL_Drives - Tento počítač
- CSIDL_Network - sieť
Uses ShlObj, ShellApi; procedure ShowSpecialFolder(const AFolder: Integer); var ItemIDList : PItemIDList; ShExInfo : ShellExecuteInfo; begin ShGetSpecialFolderLocation(Application.Handle,AFolder, ItemIDList); FillChar(ShExInfo,SizeOf(ShExInfo),0); with ShExInfo do begin cbSize:=SizeOf(ShExInfo); nShow:=sw_Show; fMask:=see_Mask_IDList; lpIDList:=ItemIDList; end; ShellExecuteEx(@ShExInfo); end; procedure TForm1.Button1Click(Sender: TObject); begin ShowSpecialFolder(CSIDL_Desktop); end;