Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach
Subscribe:

Labels

Tuesday, June 5, 2012

Write hex to the registry

This is the example to write hexadecimal value to the registry

procedure TForm1.Button1Click(Sender: TObject);
var
str: string;
dw: dword;
reg: TRegistry;
begin
str := '02000000';
try
dw := StrToInt('$' + str); // $ because it's a hex value
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKey('Software\MyCompany\MyKey', true) then
reg.WriteInteger('MyDword', dw);
finally
reg.free;
end;
except
on EConvertError do
; // not a valid integer in the string
end;
end;


Source



 comments