在onnewwindow2里写命令
procedure TForm1.WBLoginNewWindow2(Sender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool);
var
newbrowser:twebbrowser;
newtabsheet:TTabSheet;
begin
newtabsheet:=TTabSheet.Create(nil);
newtabsheet.PageControl:=pagecontrol1;
newbrowser:=twebbrowser.Create(nil);
newtabsheet.InsertControl(newbrowser);
newbrowser.align:=alclient;
pagecontrol1.ActivePage:=newtabsheet;
ppdisp:=newbrowser.Application;
end;