this slowpoke moves

Search Registry Key & Read Content

uses Registry

//

function GetBackgroundFolder: string;
  const  
    KEY   = 'Control Panel\Desktop';  // Schlüssel
    VALUE = 'WallpaperStyle';         // DWORD oder Binary
  var  
   Registry: TRegistry;  
begin  
  with TRegistry.Create do  
  try  
    RootKey := HKEY_CURRENT_USER;    // Root Schlüssel
    if OpenKey(KEY,False) then
      Result := ReadString(VALUE)  
    else  
      Result := 'KEY NOT FOUND';  
   finally  
    Free;  
   end;  
end;
Beispiel :
procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Lines.Add(GetBackgroundFolder);
  edit1.text := GetBackgroundFolder;
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate