TWEBBROWSER process explains and how to determine download web page success

zhaozj2021-02-08  215

Main topic: How to determine if it is successful when downloading the TWEBBROWSER? anxious! Author: CBuilder belongs forum: Delphi questions Points: 20 Replies: 1 Time: 2001-1-11 8:30:00 say on certain information, OnNavigateComplete2 only event will trigger when the download is successful, but I trial found that no matter Success is also triggered. How to determine if the download is successful? anxious! ! !

Reply to: Mutant: Mutant (2001-1-11 9:06:00) 0 points Procedure Tfrmie2.webdocumentComplete (Sender: Tobject; Pdisp: idispatch; var URL: olevariant); see it, yes OnDocumentComplete event triggered, you will also tell you that the URL is downloaded, it is very easy to use. If there is iframe in the page, then each iframe will trigger a DocumentComplete event. So how do we judge whether it is complete? ? Hey, TWebBrowser control is not a Busy property right procedure TfrmIE2.WebDocumentComplete? (Sender: TObject; pDisp: IDispatch; var URL: OleVariant); begin if not (Web.Busy) then begin ShowMessage ( 'downloaded'); End; end; For each connection (whether the mouse click or with a NaviGate2 method connection), TWEBBRowser process is like this: OnBeforenaviGate2 <- This event is triggered when the link will be triggered onnavigateComplete2 <- successful link to this page (later There will be the following events) OnDownloadbegin <- Start downloading the OndownloadComplete <- Download End OndocumentComplete <- The page is downloaded for each HTML page. If it is FRAME or IFRAME, the file is treated as an HTML page. That is to say, if there is 3 iframes in a page, then a total of 4 BeforenaviGate2 events. For each connection and the binaries you need to display (such as * .gif, *. Bmp, *. Jpg ...) will Trigger a DownloadBegin and DownloadComplete events.

转载请注明原文地址:https://www.9cbs.com/read-1056.html

New Post(0)