Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tags relative to their position on the Page??

Status
Not open for further replies.

cucswiz

Programmer
Jun 25, 2001
13
US
Hello all. I am trying to do a "link" mapping if you will. I would like to be able to get the position of a link relative to how many pixels down the page the link is.

I really just care about height position and not width position. Does anyone know of a way to do this?? I have not really been able to discover a method to do this with VB.. Any help would be greatly appreciated. Thanks

 
Guys, anyone have any experience in this? really need some help out there.

 
I've don't have any experience with exactly what you're doing, but could you get what you're looking for with a call to GetCursorPos API call? That'll return the X and Y coordinates (you just need Y) of the mouse cursor when it's called. Maybe you could get the coordinates when they click on your link?

If you find your numbers look right, but definately aren't, try converting the X and Y using Screen.TwipsPerPixelX and Screen.TwipsPerPixelY.

-Mike
Difference between a madman and a genius:
A madman uses his genius destructively,
A genius uses his madness constructively.
 
Mike, thanks for your input, but I am actually trying to automate the process. As in I can just give you any page, and ask for a certain link, and I would have a function that tells me how far down the page this link is.

Anyone have somekind of experience with this?

 
NO, but I do have a question: Is the "link" in a textbox or other control which may be 'found'? If so, just ues ".Top" property of the control. Otherwise, you STILL need to be able to 'programatically' locate the object. After that, it is just a matter of the details.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top