uses Registry 추가
procedure TForm1.Button3Click(Sender: TObject);
Var
Reg : TRegistry;
strRegData : string;
begin
Reg := TRegistry.Create;
try
reg.Rootkey := HKEY_CURRENT_USER;
//reg.OpenKey('\SOFTWARE\',TRUE)
//Reg.KeyExists('GrsSystem')
Reg.OpenKey('\SOFTWARE\GRSSYSTEM\',TRUE);
Reg.WriteString('GrsDBConnectString',edit3.Text);
finally
reg.Free;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
Var
Reg : TRegistry;
strRegData : string;
begin
Reg := TRegistry.Create;
try
reg.Rootkey := HKEY_CURRENT_USER;
//reg.OpenKey('\SOFTWARE\',TRUE)
//Reg.KeyExists('GrsSystem')
Reg.OpenKey('\SOFTWARE\GRSSYSTEM\',TRUE);
strRegData := Reg.ReadString('GrsDBConnectString');
edit2.text := strRegData;
finally
reg.Free;
end;
end;