1. Home
  2. Computing & Technology
  3. Delphi Programming

How to set the "home page" for the Internet Explorer from Delphi code

By , About.com Guide

Here's how to change the home page for the IE from Delphi code (IE-Tools-Internet options...)

~~~~~~~~~~~~~~~~~~~~~~~~~
uses Registry;
...
function SetIEHomePage(PageName: string): Boolean;
begin
   with TRegistry.Create do
   try
     RootKey := HKEY_CURRENT_USER;
     OpenKey('Software\Microsoft\Internet Explorer\Main', False) ;
     try
       WriteString('Start Page', PageName) ;
       Result := True;
     except
       Result := False;
     end;
     CloseKey;
   finally
     Free;
   end;
end;
//Usage:
SetIEHomePage('http://delphi.about.com')
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» How to dynamically change the Page title in ASP.NET
« Activate a control hint from code

Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2004 Delphi Tips
  7. How to set the "home page" for the Internet Explorer from Delphi code

©2009 About.com, a part of The New York Times Company.

All rights reserved.