判断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;
http://blog.csdn.net/dropme/article/details/6296926