0

So I am trying to get the URL of a link that I click while using the Gecko WebBrowser. So if I were to click on a .DLL file in my directory (URL = File://C:/File.DLL) it would then give me the URL of what I clicked. I can right click on it and get the URL but I would like to just be able to click on it and get the URL. Thank you very much!

1 Answers1

0

I just asked how the handle a click on html element in Gecko and maybe this can help you:

Private Sub browser_DomClick(ByVal sender As Object, ByVal e As Gecko.DomMouseEventArgs) Handles browser.DomClick
    Dim element As Gecko.GeckoHtmlElement = e.Target.CastToGeckoElement
    Dim url as String = element.GetAttribute("href")
End Sub

Declare

Friend WithEvents browser As Gecko.GeckoWebBrowser

if needed

Not tested!

Rhye
  • 25
  • 5