![]() |
![]() ![]() ![]() |
IESniffer component.
|
function AddBrowser(Browser: IWebBrowser2): Boolean;
|
The AddBrowser method used to add some certain Browser window to the internal list of component, and want to hook all events from that certain Browser.
|
|
The AddBrowser should be used only if Active property is False, so you don't want to detect the IE windows automatically and just want to receive events from some certain Browser (for example if you write the toolbar for Internet Explorer and want to receive events only from that browser inside the IE window below your toolbar).
|
|
![]() |
|
![]() |
procedure TBandForm.NavigateFromBand(const URL: String);
|
var
|
_Url, X: OleVariant;
|
begin
|
IESniffer1.AddBrowser(IE);
|
_Url := Url; X := 0;
|
IE.Navigate(Url, X, X, X, X);
|
end;
|
|
// another example how to add TWebBrowser to the internal list of IESniffer
|
procedure TForm1.Button1Click(Sender: TObject);
|
begin
|
IESniffer1.AddBrowser(WebBrowser1.ControlInterface);
|
end;
|
Active and IEList properties;
|
Refresh method;
|
OnWindowLoad, OnWindowUnload, OnWBDownloadComplete and OnWBQuit events.
|