How to rewrite code from vb6 to vb 2010?

Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean) Dim frmWB As Form1 Set frmWB = New Form1 Set ppDisp = frmWB.WebBrowser1.Object frmWB.Visible = True Set frmWB = Nothing End Sub 

    1 answer 1

    Honestly the studio is not at hand. But I can assume that you do not have the .Object property.

    And what do you want to do with this? You don’t need this feature at all. Create a copy of your web browser ... well, something like:

     Dim myWebBrowser As New WebBrowser() 

    Where you need and work with it - judging by the code, you do not need a visual display of the control on the screen.

    Well, or use something like HTTPClient (I do not remember the name, but there are a lot of things in System.net).