如何在网页下载的过程中在浏览器中显示自己定义的页面或其他文字图片内容?
在下面这些事件过程中怎么写?
procedure DoDownloadBegin;
beginend;procedure DoDownloadComplete;
beginend;procedure DoBeforeNavigate2(const pDisp: IDispatch; var URL: OleVariant; var Flags: OleVariant;
var TargetFrameName: OleVariant; var PostData: OleVariant;
var Headers: OleVariant; var Cancel: WordBool);
var
begin
if URL<>'http://www.china.com/'then begin
Showmessage('你不可以浏览其它站点');
Cancel:=True;
URL:='http://www.china.com';
(pDisp as IWebbrowser2).Navigate2(URL,Flags,TargetFrameName,PostData,Headers);
end;
end;procedure DoNewWindow2(var pDisp: IDispatch; var Cancel: WordBool);
begin
IHTMLDocument2((pDisp as IWebbrowser2).Document).open('http://www.china.com', '', '', '');
end;procedure DoNavigateComplete2(const pDisp: IDispatch; var URL: OleVariant);
beginend;procedure DoDocumentComplete(const pDisp: IDispatch; var URL: OleVariant);
beginend;procedure DoOnQuit;
beginend;
在下面这些事件过程中怎么写?
procedure DoDownloadBegin;
beginend;procedure DoDownloadComplete;
beginend;procedure DoBeforeNavigate2(const pDisp: IDispatch; var URL: OleVariant; var Flags: OleVariant;
var TargetFrameName: OleVariant; var PostData: OleVariant;
var Headers: OleVariant; var Cancel: WordBool);
var
begin
if URL<>'http://www.china.com/'then begin
Showmessage('你不可以浏览其它站点');
Cancel:=True;
URL:='http://www.china.com';
(pDisp as IWebbrowser2).Navigate2(URL,Flags,TargetFrameName,PostData,Headers);
end;
end;procedure DoNewWindow2(var pDisp: IDispatch; var Cancel: WordBool);
begin
IHTMLDocument2((pDisp as IWebbrowser2).Document).open('http://www.china.com', '', '', '');
end;procedure DoNavigateComplete2(const pDisp: IDispatch; var URL: OleVariant);
beginend;procedure DoDocumentComplete(const pDisp: IDispatch; var URL: OleVariant);
beginend;procedure DoOnQuit;
beginend;
http://www.seebar.net/seejieshao.htm
”看吧”广告3、浏览器转换间隙:
浏览器从一个网页转到另一个网页的过程中,有一个寻找目标网页的时间,在这段空闲的时间用户基本无事可做。系统在这一时间在浏览器中插入全屏广告,广告的最长显示时间为5秒,当浏览器找到目标网页时或显示时间超过5秒则广告消
You can subclass the IE window and draw the ads yourself.
var
Range: IHTMLTxtRange;
begin
Range := ((WebBrowser1.Document as IHTMLDocument2).body as
IHTMLBodyElement).createTextRange;
Range.collapse(False);
Range.pasteHTML('<br><b>Hello!</b>');