getting link of html element on MouseDown event in WebBrowser
<p>How can I retrieve a html element from MouseDown event? I have a following code:</p>

<pre><code>public void Scrollback_Clicked(object sender, HtmlElementEventArgs e)
    {
        if (e.MouseButtonsPressed == System.Windows.Forms.MouseButtons.Right)
        {
            if (e.FromElement != null)
            {
                if (e.FromElement.Name == "a")
                {
                    ViewLn(e.FromElement.InnerText);
                }
            }
        }
    }
</code></pre>

<p>e.FromElement is null. I need to retrieve the <code>HtmlElement</code> when I right click on any link in browser.</p>

<p>I found the answer, but can't submit it:</p>

<p>Ok, after some playing with code I found it out:</p>

<p>The answer is use the webBrowser.Document.ActiveElement which contains the focused element (in case of mouse click it's the element you want)</p>
