判断Webbrowser是否加载完成

[delphi] view plain copy
 
  1. var  
  2.   Form1: TForm1;  
  3.   glpDisp: IDispatch = nil;  
  4. implementation  
  5. {$R *.dfm}  
  6. procedure TForm1.EmbeddedWB1DocumentComplete(ASender: TObject;  
  7.   const pDisp: IDispatch; var URL: OleVariant);  
  8. begin  
  9.   if (glpDisp <> nil) and (glpDisp = pDisp) then  
  10.   begin  
  11.     glpDisp := nil;  
  12.     Caption:= 'ok';  
  13.   end;  
  14. end;  
  15. procedure TForm1.EmbeddedWB1NavigateComplete2(ASender: TObject;  
  16.   const pDisp: IDispatch; var URL: OleVariant);  
  17. begin  
  18.   if glpDisp = nil then  
  19.     glpDisp := pDisp;  
  20. end;  
 
 http://blog.csdn.net/dropme/article/details/6296926
原文地址:https://www.cnblogs.com/findumars/p/5277609.html