How to Get a html page content using Inet in vb6 and put the content in a TextBox?

后端 未结 3 741
没有蜡笔的小新
没有蜡笔的小新 2021-01-25 08:19

How to Get a html page content using Inet in vb6 and put the content in a TextBox ?

相关标签:
3条回答
  • 2021-01-25 09:00

    You can also use vb6 webbrowser control.Using this you can get html page and of course according to html tag,input id etc.

    0 讨论(0)
  • 2021-01-25 09:03

    Try this:

    Function GetHTMLCode(Optional strURL As String) As String
        Dim objHttp As Object, strText As String
        Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
        objHttp.Open "GET", strURL, False
        objHttp.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
        objHttp.Send ("")
        strText = objHttp.responseText
        Set objHttp = Nothing
        GetHTMLCode = strText
    End Function
    

    OK?)

    0 讨论(0)
  • 2021-01-25 09:11

    Try sample code in Retrieving Data Using Visual Basic article.

    0 讨论(0)
提交回复
热议问题