[delphi/web] how to detect when a Document is comp...
2004.01.12
An other example:
This example shows how to detect when a document is completely
loaded, even if it includes multiple frames. Only the final
OnDocumentComplete event passes the same Dispatch interface as the
OnNavigateComplete event handler.
var
CurDispatch: IDispatch; {save the interface globally }
procedure TForm1.WebBrowser1NavigateComplete2(Sender: TObject; const
pDisp: IDispatch; var URL: OleVariant);
begin
if CurDispatch = nil then
CurDispatch := pDisp; { save for comparison }
end;
procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject; const
pDisp: IDispatch; var URL: OleVariant);
begin
if (pDisp = CurDispatch) then
begin
Beep; {the document is loaded, not just a frame }
CurDispatch := nil; {clear the global variable }
end;
end;
cu Andries
'Delphi, RadStudio' 카테고리의 다른 글
[Delphi] 작업관리자에 내 프로세서 감추기 (0) | 2016.10.03 |
---|---|
[delphi] Thread를 이용하여 ProgressBar 그리기 (0) | 2016.07.16 |
Delphi 설치 후 TADOConnection(dbgo)이 없다? (0) | 2016.06.28 |
Delphi 설치 후 TChart(TeeChart)가 없다? (0) | 2016.06.24 |
[개발/delphi] Graphics32 v.1.7.1 for D4,5,6,7,2005 C5,6 (0) | 2016.01.16 |
댓글