Chad Torkkola

Chad Torkkola

  • NA
  • 5
  • 11.1k

Getting the X and Y position of a html Element in the WebBrowser control

Mar 31 2012 1:05 AM
Hi guys,
I am real stuck! 
I am trying to automate a proccess of saving images and metadata from some sites I use and the method I chose to do this was to:
- Create a windows form
- Add a webbrowser object
- Navigate to page
- on mouse over ov a "img" element move  a button to the top right corner of the image

That is where I am stuck! While I found a couple ways to get the position of the image when I scroll down the page it seems to not work anymore.

Is there a way to get the current screen position of an html element so I can overlay a button on the top right corner of it regardless of where I am in the document body? (scrolling)

Thanks so much in advance I played around with this for over an hour!



Answers (3)