Hi all
I have some problem with code below which i search from google, this code is writing in vb6 but i need to rewrite and edit it in Visual Studio 2017. I meet some problem below
Code Error 1:
Public Function getHTML(address)
Dim objXmlHttp : Set objXmlHttp = CreateObject("MSXML2.XMLHTTP.6.0")
objXmlHttp.Open "get", address
objXmlHttp.send
getHTML = objXmlHttp.responseText
End Function
It show me the message when i start run the program below
BC30807 Visual Basic AND VB.NET 'Let' and 'Set' assignment statements are no longer supported.
Severity Code Description Project File Line Suppression State
Error BC30807 'Let' and 'Set' assignment statements are no longer supported. CbRecorder C:\Users\USER\source\CbRecorder\CbRecorder\Form1.vb 47 Active
BC30800 Visual Basic AND VB.NET Method arguments must be enclosed in parentheses.
Severity Code Description Project File Line Suppression State
Error BC30800 Method arguments must be enclosed in parentheses. CbRecorder C:\Users\USER\source\CbRecorder\CbRecorder\Form1.vb 48 Active
Code Error 2:
Private ReadOnly Property Left(modelHtml As Object, v As Integer) As Object
Get
Throw New NotImplementedException()
End Get
End Property
It show me the message below :
BC40003 Visual Basic AND VB.NET property 'Left' shadows an overloadable member declared in the base class 'Control'. If you want to overload the base method, this method must be declared 'Overloads'.
Code Error 3:
Private ReadOnly Property Right(modelHtml As Object, v As Integer) As Object
Get
Throw New NotImplementedException()
End Get
End Property
It show me the message below :
BC40003 Visual Basic AND VB.NET property 'Right' shadows an overloadable member declared in the base class 'Control'. If you want to overload the base method, this method must be declared 'Overloads'.
Code Erroe 4:
Public Function getHTML(address)
Dim objXmlHttp : Set objXmlHttp = CreateObject("MSXML2.XMLHTTP.6.0")
objXmlHttp.Open "get", address
objXmlHttp.send
getHTML = objXmlHttp.responseText
End Function
It show me the message below :
BC42104 Visual Basic AND VB.NET Variable is used before it has been assigned a value. A null reference exception could result at runtime.
Please help me if you know how to edit this code into vb.net. thanks in advance
What I have tried:
i wish someone will know how to do it.