Proyect Rapture
Element Clicked in WebBrowser.
How to determine which Image with ID.
13 June 2017
To determine which Element was clicked.
Public Class Form1

Dim WithEvents IEDoc As System.Windows.Forms.HtmlDocument

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End Sub

Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

      IEDoc = WebBrowser1.Document
   Catch ex As Exception
   End Try
End Sub

Private Sub IEDoc_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs) Handles IEDoc.MouseDown

If e.MouseButtonsPressed = MouseButtons.Left Then
   Dim ScreenCoord As Point
   ScreenCoord = New Point(MousePosition.X, MousePosition.Y)
   Dim BrowserCoord As Point
   BrowserCoord = WebBrowser1.PointToClient(ScreenCoord)
   Dim elem As HtmlElement
   elem = WebBrowser1.Document.GetElementFromPoint(BrowserCoord)
End If
End Sub
End Class