在WebBrowser的
procedure TForm1.WebBrowser1BeforeNavigate2(Sender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
begin
Cancel := True;
Form2.Show;
end;
procedure TForm1.WebBrowser1NewWindow2(Sender: TObject;
var ppDisp: IDispatch; var Cancel: WordBool);
begin
Cancel:= True;
Form3.Show;
end;
写东西,一个是网页跳转,一个是网页弹出新窗口,把Cancel设置False,然后
替换成你的Form就可以了