Delphi(原创)|判断Webbrowser是否加载完成

【Delphi(原创)|判断Webbrowser是否加载完成】var Form1: TForm1; glpDisp: IDispatch = nil; implementation {$R *.dfm} procedure TForm1.EmbeddedWB1DocumentComplete(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); begin if (glpDisp <> nil) and (glpDisp = pDisp) then begin glpDisp := nil; Caption:= 'ok'; end; end; procedure TForm1.EmbeddedWB1NavigateComplete2(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); begin if glpDisp = nil then glpDisp := pDisp; end;

    推荐阅读