THIS
.axwebbrowser1.newwindow2
=
New
Axshdocvw.dwebbrowserevents2_newwindow2eventhandler
THIS
.axwebbrowser1_newwindow2;
Private
Void
AxWebBrowser1_newwindow2 (
Object
Sender, axshdocvw.dwebbrowserevents2_newwindow2event e)
...
{Browserform Form = New Browserform (); form.mdiparent = this.mdiparent; E.ppdisp = form.axwebbrowser1.application; form.show ();
Where axwebbrowser1_newwindow2 is the response function of NewWindow2, just manually create a new MDI sub-window after capturing events and pass the Application value of the AxWebBrowser in the sub-window to E.ppdisp. It should be noted that the E.CANCEL property cannot be set to TRUE.