Mega Code Archive

 
Categories / Delphi / Activex OLE
 

Control the internet explorer using ole

uses Comobj; {...} var Form1: TForm1; IEApp: OLEVariant; implementation {$R *.DFM} procedure TForm1.Button1Click(Sender: TObject); begin IEApp := CreateOLEObject('InternetExplorer.Application'); IEApp.Visible := True; IEApp.Top := 0; IEApp.Left := 0; IEApp.Width := Screen.Width; IEApp.Height := Screen.Height; IEApp.Navigate('http://www.swissdelphicenter.ch'); end; { To Close the Internet Explorer: Um Internet Explorer beenden: } IEApp.Quit; { Some other methods: Einige andere Methoden: } IEApp.GoForward IEApp.GoBack IEApp.GoHome IEApp.Refresh IEApp.Stop IEApp.GoHome IEApp.FullScreen := true; { To set some Properties: Einige Eigenschaften setzen: } IEApp.StatusText := 'My Status Text'; { IEApp.Path = Show Path to IE, Pfad anzeigen IEApp.FullName = Full Path to IE, voller Pfad zum IE IEApp.LocationURL = Get active Url, Aktuelle URL }