[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;