没有组件。这是一个类,你看Help,然后慢慢地用吧。
不过,我觉得TRegIni用起来更方便。

解决方案 »

  1.   

    呵呵,是类阿,my:TRegistry;:)
      

  2.   

    你把他的TRegistry示例代码拷过来,再略一修改,了事。
      

  3.   

    建议你使用Ini文件,给你个简单的类:type
      TInifileX = class(TInifile)
      private
      protected  public
        constructor Create(const asFileName: string = '');
        destructor Destroy; override;    procedure WriteStrings(const asSectName: string; assValues: TStrings);    function ReadStr(const asSectName, asIdent: string): string;
        function ReadInt(const asSectName, asIdent: string): Integer;
        function ReadBol(const asSectName, asIdent: string): Boolean;
        function ReadDTime(const asSectName, asIdent: string): TDateTime;
        procedure ReadStrings(const asSectName: string; assValue: TStrings);
      published  end;{ TInifileX }constructor TInifileX.Create(const asFileName: string);
    var
      sFileName: string;
    begin
      if asFileName = '' then
        sFileName := ChangeFileExt(ParamStr(0), '.INI')
      else sFileName := asFileName;  inherited Create(sFileName);
    end;destructor TInifileX.Destroy;
    begin  inherited;
    end;function TInifileX.ReadBol(const asSectName, asIdent: string): Boolean;
    begin
      Result := ReadBool(asSectName, asIdent, False);
    end;function TInifileX.ReadDTime(const asSectName,
      asIdent: string): TDateTime;
    begin
      Result := ReadDateTime(asSectName, asIdent, Now);
    end;function TInifileX.ReadInt(const asSectName, asIdent: string): Integer;
    begin
      Result := ReadInteger(asSectName, asIdent, 0);
    end;function TInifileX.ReadStr(const asSectName, asIdent: string): string;
    begin
      Result := ReadString(asSectName, asIdent, '');
    end;procedure TInifileX.ReadStrings(const asSectName: string; assValue: TStrings);
    var
      i: Integer;
      sLine: string;
    begin
      if assValue = nil then
        assValue := TStringList.Create;  assValue.Clear;
      for i := 0 to 99 do
      begin
        sLine := ReadString(asSectName, IntToStr(i), '');
        if sLine = '' then Break;
        assValue.Add(sLine);
      end;
    end;procedure TInifileX.WriteStrings(const asSectName: string;
      assValues: TStrings);
    var
      i: Integer;
    begin
      EraseSection(asSectName);  for i := 0 to assValues.Count - 1 do
        WriteString(asSectName, IntToStr(i), assValues[i]);
    end;
      

  4.   

    这样使用比较简洁:
      with TInifileX.Create do
      try
        sDBSvrName := ReadStr(DB_SECTION, DBSVR_NAME);
        sDBName := ReadStr(DB_SECTION, DB_NAME);
        ...
      finally
        Free;
      end;
      

  5.   

    简单.首先在interface段中的uses语句中加入Registry,然后在你需要的地方声明一个TRegistry组件即可。
    给个例子:
    var
    Reg:TRegistry;
    PWord:String;//记录密文字符串
    begin
      Reg:=TRegistry.Create;
      try
        Reg.RootKey:=HKEY_LOCAL_MACHINE;
        //在这里完成你需要的操作,详情查阅Help文档。
      finally
        Reg.Free;
      end;
    end;
      

  6.   

    the same as zqw0117(等明天的猴子) ,I was too late,damn.