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
There is a direct way to get the coordinates. IHTMLElement2 has the method getBoundingClientRect
that gives you the coordinates of the element.
IHTMLDocument3 doc = (IHTMLDocument3)this.webbrowser.Document;
IHTMLElement2 element = (IHTMLElement2)doc.getElementById(idElement);
IHTMLRect rect = element.getBoundingClientRect();
int x = rect.left;
int y= rect.top;