Pulpit

0

Czesc

Jak zdobyc sciezke do pulpitu?

End;

0

do uses dodaj ShlObj

uses ShlObj;

function GetP(Folder: Integer): String;
var FilePath: array[0..MAX_PATH] of char;
begin
  SHGetSpecialFolderPath(0, FilePath, Folder , False);
  Result:=FilePath;
end;

A to wrzuć do zdarzenia np Button1Click

ListBox1.Items.Add('AutoStart '+getp(CSIDL_STARTUP));
ListBox1.Items.Add('Dane aplikacji '+getp(CSIDL_APPDATA));
ListBox1.Items.Add('Kosz'+getp(CSIDL_BITBUCKET));
ListBox1.Items.Add('Ikony dla Panelu Sterowania '+getp(CSIDL_CONTROLS));
ListBox1.Items.Add('Cookies (Internet) '+getp(CSIDL_COOKIES));
ListBox1.Items.Add('Wirtualny pulpit '+getp(CSIDL_DESKTOP));
ListBox1.Items.Add('Fizyczny pulpit '+getp(CSIDL_DESKTOPDIRECTORY));
ListBox1.Items.Add('Mój komputer '+getp(CSIDL_DRIVES));
ListBox1.Items.Add('Ulubione '+getp(CSIDL_FAVORITES));
ListBox1.Items.Add('Czcionki '+getp(CSIDL_FONTS));
ListBox1.Items.Add('Historia (Internet) '+getp(CSIDL_HISTORY));
ListBox1.Items.Add('Wirtualny internet '+getp(CSIDL_INTERNET));
ListBox1.Items.Add('Tymczasowy internet '+getp(CSIDL_INTERNET_CACHE));
ListBox1.Items.Add('Otoczenie sieciowe '+getp(CSIDL_NETHOOD));
ListBox1.Items.Add('Dokumenty '+getp(CSIDL_PERSONAL));
ListBox1.Items.Add('Drukarki '+getp(CSIDL_PRINTERS));
ListBox1.Items.Add('Programy Menu Start '+getp(CSIDL_PROGRAMS));
ListBox1.Items.Add('Ostanio używane dokumenty '+getp(CSIDL_RECENT));
ListBox1.Items.Add('Wyślij do... '+getp(CSIDL_SENDTO));
ListBox1.Items.Add('Opcje Menu Start '+getp(CSIDL_STARTMENU));
ListBox1.Items.Add('Wzorce dokumentów '+getp(CSIDL_TEMPLATES));

1 użytkowników online, w tym zalogowanych: 0, gości: 1