iesniffer IEList property
Return to Introduction  Previous page  Next page
Applies to
IESniffer component.  

Declaration
property URLList: TacIEList;  

Description
The URLList property is the list of containers for each detected instance of Explorer and their IWebBrowser2 interface. This is just descendant of usual TList which contains TacIEHelper objects. Here is how TacIEHelper object are introduced in IESniffer unit:  
type  
  TacIEHelper = class(TInterfacedObject, IUnknown, IDispatch)  
  public  
    property Browser: IWebBrowser2; // pointer to IWebBrowser2 interface  
    property IsCompleted: Boolean;  // whether ReadyState of Browser is in READYSTATE_COMPLETE  
    property URL: String read FURL; // current URL  
  end;  

Example (demonstrates how to fill some ListView with URLs and the page titles grabbed from each Explorer window)
procedure TForm1.RefreshActiveInstancesInListView;  
var  
  I: Integer;  
  ListItem: TListItem;  
begin  
  with ListView1, Items do  
   try  
     BeginUpdate;  
     Clear;  
 
     I := IESniffer1.IEList.Count;  
     if I <> 0 then  
      for I := 0 to I - 1 do  
       with IESniffer1.IEList[I] do  
        try  
         ListItem := Items.Add;  
         ListItem.Caption := URL;  
         ListItem.SubItems.Add(Browser.LocationName);  
        except  
        end;  
   finally  
     EndUpdate;  
   end;  
end;  

See also
SniffWithHTTPPrefixOnly property;  
OnWindowLoad and OnWindowUnload events.  
File not found.