Unit
  BtrTitan;

interface

Uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;

type
  TTitanForm =
  class(TForm)
    Button1: TButton;
    Bevel1: TBevel;
    Image1: TImage;
    Bevel2: TBevel;
    Bevel3: TBevel;
    Label2: TLabel;
    Label3: TLabel;
    UserName: TLabel;
    UserOrg: TLabel;
    UserID: TLabel;
    Label1: TLabel;
    Procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  TitanForm: TTitanForm;

implementation
{$I BAPI.INC}

Uses
  BseRgtry,

  BseConst;

{$R *.DFM}

procedure TTitanForm.FormCreate(Sender: TObject);
Var
  R : TRightsRegistry;

  Function GetStringValue( Const Setting : String ) : String;
  begin
    If R.ValueExists( Setting ) then
      Result := R.ReadString( Setting )
    else
      Result := '';
  end;

begin
  Label3.Caption := BAPI_PRODUCT_NAME + ' ' + BAPI_VERSION_NUMBER +
                      ' - ' + BAPI_VERSION_DATE;
  R := TRightsRegistry.Create;
  Try
    R.RootKey := REG_ROOT;
    R.Rights  := KEY_READ;
    If R.OpenKey( REG_PRODUCT, FALSE ) then
    begin
      UserName.Caption := GetStringValue( REG_REGOWNER  );
      UserOrg.Caption  := GetStringValue( REG_REGORG    );
      UserID.Caption   := GetStringValue( REG_PRODUCTID );
    end;
  Finally
    R.Free;
  end;
end;

procedure TTitanForm.Button1Click(Sender: TObject);
begin
  Close;
end;

end.
