procedure TForm1.WebBrowser1NewWindow2(Sender: TObject; var PpDisp: IDispatch; var Cancel: WordBool); begin PpDisp := WebBrowser2.Application; end; procedure TForm1.WebBrowser2BeforeNavigate2(Sender: TObject; const PDisp: IDispatch; var URL, Flags, TargetFrameName, PostData, Headers: OleVariant; var Cancel: WordBool); var urlStr: string; begin urlStr := string(URL); WebBrowser1.Navigate(Str); Cancel := True; end; |
|