3
Answers

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

Photo of Chad Torkkola

Chad Torkkola

13y
7.3k
1
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)

0
Photo of Roei Bar
NA 7.8k 0 15y
i could offer you to read on howto build a setup application

but easier is to use this tutorial :

http://msmvps.com/blogs/haarongonzalez/archive/2007/04/09/772757.aspx

its very simple to understand...

if you liked this Mark it as "Accepted Answer"