Extract from code (I use this so I know it works):
Registry := TRegistry.Create;
with Registry do
begin
RootKey := HKEY_LOCAL_MACHINE;
if OpenKey('Clock Settings', True) then
begin
if ValueExists('FormTop') then
frmTime.Top := ReadInteger('FormTop');
end;
end;
with Registry do
begin
RootKey := HKEY_LOCAL_MACHINE;
if OpenKey('Clock Settings', True) then
begin
WriteInteger('FormTop', frmTime.Top);
end;
end;
____________________Reply Separator____________________
Subject: RE: [DUG]: TRegistry
Author: [EMAIL PROTECTED]
Date: 14/07/2000 16:19
What are you writing from?
An application should be no problem.
A DLL or Service application can cause problems. In some cases NT security
will just not let you write to the registry (Especially a DLL). You should
be able to read okay.
Myles.
> -----Original Message-----
> From: Tony Sinclair [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, July 14, 2000 4:26 PM
> To: Multiple recipients of list delphi
> Subject: [DUG]: TRegistry
>
> Hi all,
>
> I am trying to get the T(Damn)Registry to save some values into
> HKEY_LOCAL_MACHINE and it just won't do it. Is there anything I need to
> do
> special apart from
>
> RootKey
> Access
> OpenKey
> WriteString
> CloseKey
>
> Thanks in advance
>
> Tony Sinclair
> Holliday Group Limited
> Christchurch
> New Zealand
>
>
--------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz