WHen we click on site whether left click or right....Control goes to IEDoc_MouseDown event,I just want to ask is that possible to know taht which element is clicked..Suppose we right click on link,is that possible to know it that link is clicked.
Public Class Form2
Dim WithEvents IEDoc As System.Windows.Forms.HtmlDocument
Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
WebBrowser1.Navigate("www.google.com")
If WebBrowser1.IsWebBrowserContextMenuEnabled Then
WebBrowser1.IsWebBrowserContextMenuEnabled = False
End If
End Sub
Private Sub WEB_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Try
IEDoc = WebBrowser1.Document
Catch ex As Exception
MsgBox(ex.Message)
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 = Windows.Forms.MouseButtons.Right Then
MsgBox("sonia")
End If
End Sub
End Class
PLZ let me know...Very Urgent