unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, registry, ComCtrls, StdCtrls;
type
TForm1 =
class(TForm)
TrackBar1: TTrackBar;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
pos: integer;
reg: Tregistry;
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(inttostr(pos));
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
try
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.OpenKey('
Software\CrkT', True);
pos := reg.ReadInteger('
Alphawert');
finally
reg.Free;
end;
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
Pos := trackbar1.Position;
Form1.AlphaBlendValue := pos;
reg := Tregistry.Create;
try
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.OpenKey('
Software\CrkT', True);
reg.WriteInteger('
Alphawert', pos);
finally
reg.Free;
end;
end;
end.