Okay
Uses:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Registry;
Button1 (Gem knappen):
procedure TForm1.Button1Click(Sender: TObject);
var
Registry: TRegistry;
begin
Registry:=TRegistry.Create;
Registry.RootKey:=HKEY_LOCAL_MACHINE;
If Registry.OpenKey('Test',True) then
begin
Registry.WriteString('EditFelt', Edit1.Text);
Registry.WriteBool('CheckBox', CheckBox1.Checked);
Registry.Free;
end;
end;
Button2 (Hent knappen):
var
Registry: TRegistry;
begin
Registry:=TRegistry.Create;
Registry.RootKey:=HKEY_CURRENT_USER;
If Registry.OpenKey('Test',True) then
Edit1.Text := Registry.ReadString('EditFelt');
CheckBox1.Checked := Registry.ReadBool('CheckBox');
Registry.Free;
end;
-Men underligt nok vil den gerne nu...
-Har ikke ændret noget, er det baremin com der r mærkelig?