I was wondering if its possible to get the absolute position of specific HTML element I have loaded in webbrowser control with C#.
I tried almost all of the options that
The cleanest way that works for me is the following:
HtmlElement elem = webBrowser.Document.GetElementById(idElement); IHTMLRect rect = ((IHTMLElement2) elem.DomElement).getBoundingClientRect(); // rect.top and rect.left represent absolute coordinates.