# VBForums CodeBank > CodeBank - Other >  [DELPHI] - Get/Set IE Homepage

## Madboy

```
Uses

Registry;

function GetIEStartPage: string;
var
  Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    Reg.OpenKey('Software\Microsoft\Internet Explorer\Main', False);
    try
      Result := Reg.ReadString('Start Page');
    except
      Result := '';
    end;
    Reg.CloseKey;
  finally
    Reg.Free;
  end;
end;

function SetIEStartPage(APage: string): Boolean;
var
  Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    Reg.OpenKey('Software\Microsoft\Internet Explorer\Main', False);
    try
      Reg.WriteString('Start Page', APage);
      Result := True;
    finally
      Reg.CloseKey;
      Result := False;
    end;
  finally
    Reg.Free;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage(GetIEStartPage); {Get Homepage}
  SetIEStartPage('www.vbforums.com'); {Set Homepage}
end;
```

----------

