I am trying to get the mouse events on the WebBrowser.
I found the following code that will do one of the events - but I want it to do middle mouse button down AND middle mouse button up.
I have never used code like this before so I'm not sure how to modify it.
Thanks.
I found the following code that will do one of the events - but I want it to do middle mouse button down AND middle mouse button up.
I have never used code like this before so I'm not sure how to modify it.
Thanks.
Code:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
AddHandler WebBrowser1.Document.MouseDown, AddressOf eventSub
End Sub
Sub eventSub(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs)
Dim event_html As New HtmlElementEventHandler(AddressOf wbMouseDown)
event_html.Invoke(sender, e)
End Sub
Sub wbMouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs)
If e.MouseButtonsPressed = Windows.Forms.MouseButtons.Middle Then
MsgBox("middle down")
End If
End Sub