Thread View: borland.public.delphi.activex.controls.using
1 messages
1 total messages
Started by weirdo3d
Thu, 31 May 2007 12:00
Problem: HTMLDocumentEvents doesn't work on Gmail
Author: weirdo3d
Date: Thu, 31 May 2007 12:00
Date: Thu, 31 May 2007 12:00
47 lines
2508 bytes
2508 bytes
I want to capture certain events on websites. I'm using IWebBrowser2
and HMTLDocumentEvents. Basically, I'm interested in OnClick event of
HTMLDocumentEvents. On DocumentComplete event, I connect the
HtmlDocumentEvent object. Things work fine on most of the cites, I get
the Onclick event, but on certain sites, that do a lot of loading
(frames),e.g. Gmail, I don't get any event. I went through these two
articles.
http://support.microsoft.com/kb/180366/
http://support.microsoft.com/kb/246247
and now my code looks like this
gpDisp := nil;
procedure TMyBhoObject.NavigateComplete2(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
begin
if gpDisp = nil then
gpDisp := pDisp;
end;
procedure TMyBhoObject.DocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
begin
if (pDisp = gpDisp) then
begin
FSinkComponent.Connect(WebBrowser.Document as IHTMLDocument2);
FSinkComponent.onClick := DocumentOnClick;
FSinkComponent.onkeypress := DocumentOnKeyPress;
gpDisp := nil;
end;
end;
Can anyone please help me out in tracing the problem. OnClick doesn't
work when i run this on Gmail... it works otherwise.
I'm using Delphi2006 on WindowsXP, but any help or reference would be
appreciated.
Thankyou!
Ahmed
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads