See whether mouse is on a link -- web browser
Hey, I am creating a web browser which is a bit like chrome/ ie in the sense that I want the context menu strip to change once a link is hovered upon.
So when you right click on a link it displays a different context menu to the one before if no link has the mouse hovered on them.
Thanks in advance!
Basically when a link is hovered upon I would like to see if it is a link and if it is then to change the web browser's context menu
Re: See whether mouse is on a link -- web browser
Well question one: why are you doing this? If it's a student project, to learn or for fun, then that's fine. If it's for something real that you plan to use, I'd go with a ready-made solution. (Either just using a web browser -- there are lots of small ones if you don't like FF/IE/Opera/Chrome/Safari or use a code library for C#).
Anyway, I'm not sure. Presumably you could figure out the coordinates on the screen of the rectangle (or rectangles if it splits across lines) that enclose the link. Then you could use the MouseMove or MouseHover events of the control to check if the mouse if in one of the link-rectangles and display the appropriate message on the status strip.
I suspect that solution would be non-trivial, but not impossible.
Anyone else have a better solution?
Re: See whether mouse is on a link -- web browser
As a way of learning for my computer program GCSE -- a bit like revision :p
Re: See whether mouse is on a link -- web browser
Fair enough; there is never anything wrong with programming to learn!
Good luck with your exams!
Re: See whether mouse is on a link -- web browser
Re: See whether mouse is on a link -- web browser
I have got the answer, by using csEXWB -- a .Net wrapper