怎样设计VB来获取网页原代码 请达人指点

来源:百度知道 编辑:UC知道 时间:2024/06/30 00:57:29

'引用Microsoft Internet Controls
Private Sub Command1_click()
Dim Source1 As String
Source1 = Inet1.OpenURL(Text1.Text)
'获得源代码
If Source1 <> "" Then
'如果获得了源代码
Text1.Text = Source1
'显示内容
Me.Inet1.Cancel
'Inet1控件取消连接
Else
Inet1.Cancel
MsgBox ("操作出错!")
End If
End Sub