'引用 Microsoft HTML OBject Library引用方法是在VB里点 菜单里的工程,引用,找到后前边打对号就行了将下边的代码复制到程序里!
Dim WithEvents M_Dom As MSHTML.HTMLDocument
Private Function M_Dom_oncontextmenu() As Boolean
M_Dom_oncontextmenu = False
End Function
Private Sub Webbrowser1_DownloadComplete()
Set M_Dom = WebBrowser1.Document
End Sub
Private Sub Form_Load()
WebBrowser1.Silent = True
End Sub
'webbrowser2打开webbrowser1的连接
Private Sub Form_Load()
End Sub
Private Sub webbrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Set ppDisp = webbrowser2.object
End Sub