TSHELLWINDOWOBSERVER

This component was born out of frustration, since I wasn't able to connect to an existing instance of Internet Explorer AND catch the events it fires. There must be a better way to do it, let me know if you have figured it out. I use timers.

EXCEPTIONS

EIdNotFound = class(Exception);

TSHELLWINDOW

  TShellWindow = class
    id : integer;
    handle : HWND;
    LocationURL : String;
    LocationName : String;
    IEHandle : IWebBrowser2;
  end;

PROCEDURE TYPES


TOnAddedEntry = procedure (Sender : TObject; ShellWindow : TShellWindow; Str : String) of object;
Fired whenever an existing instance of Internet Explorer moves to another URL, or when a new instance is opened. Str is in the form
ID:URL:TITLE:TIME, and it is added at the end of the LoggedChanges Property, and the delimiter, in this example :, is set through the Delimiter Property



TOnChangedNumber = procedure (Sender : TObject; Number : Integer) of object;
Fired whenever an instance of Internet Explorer is closed or opened. Number is the current number of opened instances

TSHELLWINDOWOBSERVER

Properties

Methods

function GetShellWindowOnId(Id : integer) : TShellWindow;

Events

OnAddedEntry : TOnAddedEntry;
OnChangedNumber : TOnChangedNumber;


Diego Amicabile
diegoami@yahoo.it