jak odczytać klucz z dwóch innych programów
var
Reg : TRegistry;
KeyExists : Boolean;
s : String;
begin
Reg := TRegistry.Create;
try
Begin
KeyExists := Reg.OpenKey('Software\program1\Settings', False); // otworz klucz
Label1.Caption := Reg.ReadString('Key');
end;
begin
KeyExists := Reg.OpenKey('Software\program2\Settings', False);
Label2.caption := Reg.ReadString('Key');
end;
finally
Reg.Free;
end;
end;
jak to ma wyglądać bo wyskakuje mi błąd[code][Hint] Main.pas(36): Value assigned to 'KeyExists' never used
[Hint] Main.pas(31): Variable 's' is declared but never used in 'TForm1.FormCreate'[/code]
co to moze byc czemu tak nie idzie