VB里怎样显示网页内容?

来源:百度知道 编辑:UC知道 时间:2024/05/31 07:43:12
怎么把网页内容显示在VB里?能提供代码吗?

添加 WebBrowser控件 Text1.text
WebBrowser1.Navigate "http://..."

Dim doc, objhtml As Object
Dim i As Integer
Dim strhtml As String

If Not WebBrowser1.Busy Then
Set doc = WebBrowser1.Document
i = 0
Set objhtml = doc.body.createtextrange()
If Not IsNull(objhtml) Then
Text1.Text = objhtml.htmltext
End If
Timer1.Enabled = False
End If