7,785
社区成员




Option Explicit
Private WithEvents htmDoc As HTMLDocument
Private Function htmDoc_onclick() As Boolean
MsgBox "aaaaa"
End Function
Private Sub Command1_Click()
WebBrowser1.Navigate2 "http://www.g.cn"
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.g.cn"
End Sub
Private Sub htmDoc_onmousemove()
Dim oEvent As CEventObj
Set oEvent = htmDoc.parentWindow.event
Debug.Print "触发事件的元素的ID是"; oEvent.srcElement.Id
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'MsgBox "stop"
Set htmDoc = pDisp.Document
End Sub