Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't use TRegistry neither TChild

Status
Not open for further replies.

tosh5457

Programmer
May 30, 2007
8
PT
I'm just a programming & Delphi begginner and somehow i can't use TRegistry neither TChild class. when i declare a variable with TRegistry or TChild type the compiler's error message is "undeclared identifier : 'TChild'". The same happens with TRegistry.
I'm using Delphi 6 Enterprise edition.

Thanks in advance
 
I'm really a begginner >_>. i didnt have Registry on uses list.. sorry for bothering
 
small example:

Code:
uses Registry, SysUtils;
....
procedure readregistry;

var Reg : TRegistry

begin
 Reg := TRegistry.Create;
 try
  Reg.RootKey := HKEY_LOCAL_MACHINE;
  if Reg.OpenKey('\software\microsoft\windows\currentversion', False) then
   begin
    ShowMessage(Reg.Readstring('ProductId'));
    Reg.CloseKey;
   end;
 finally
  FreeAndNil(Reg);
 end;
end;

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top