How to show link in a textbox when mouse hovers on Webbrowser link?

K

kimiraikkonen

Hi,
I couldn't find a necessary class which shows when mouse hovers on a
link in Webbrowser control.

Think of there's a status bar(text), when mouse comes on a link, the
URL must be shown in this status bar.

How can i do this?

Thanks.
 
C

Cor Ligthert[MVP]

Kimi,

That is not a class, that is an event, the best in my idea is just the
Textbox enter, that fires only ones. (There is a hoover, but that is without
sence it has just to be showed as you enter it). If you really need it there
is as well a textbox.leave.

Cor
 
K

kimiraikkonen

Kimi,

That is not a class, that is an event, the best in my idea is just the
Textbox enter, that fires only ones. (There is a hoover, but that is without
sence it has just to be showed as you enter it). If you really need it there
is as well a textbox.leave.

Cor

Hi Cor,
Yes, event (hover) must occur (show URL) when mouse is on webbrowser
control. However i couldn't find a hover event unlike a button. The
problem part is hovering. There is no such event in webbrowser control.
 
C

Cor Ligthert[MVP]

Kimi,

You need to place the webbrowser on a form, by instance beneath a textbox.

Then you can fill the textbox with the url that you use or get from the
navigate.

Cor
 
L

Lloyd Sheen

kimiraikkonen said:
Hi Cor,
Yes, event (hover) must occur (show URL) when mouse is on webbrowser
control. However i couldn't find a hover event unlike a button. The
problem part is hovering. There is no such event in webbrowser control.

I have an app which uses the webcontrol, so I opened it and what I found is
the following:

WebBrowser control has no MouseHover event.
WebBrowser has Control as a base class and Control has a MouseHover event.

I then in the load of the form created a Control variable which I set to the
WebBrowser control. I could then use AddHanlder to add a MouseHover event
handler to the WebBrowser. Testing it showed that no events were raised for
the MouseHover when over the browser. Since the WebBrowser control does not
expose the MouseHover it must be eating the events itsself.

Perhaps you can create a mouse event handler for the application (I don't
know if that can be done) and write code to simulate the MouseHover.
Otherwise I think you are out of luck there. I know that IE does what you
want to do so it can be done.

LS
 
K

kimiraikkonen

I have an app which uses the webcontrol, so I opened it and what I found is
the following:

WebBrowser control has no MouseHover event.
WebBrowser has Control as a base class and Control has a MouseHover event.

I then in the load of the form created a Control variable which I set to the
WebBrowser control. I could then use AddHanlder to add a MouseHover event
handler to the WebBrowser. Testing it showed that no events were raised for
the MouseHover when over the browser. Since the WebBrowser control does not
expose the MouseHover it must be eating the events itsself.

Perhaps you can create a mouse event handler for the application (I don't
know if that can be done) and write code to simulate the MouseHover.
Otherwise I think you are out of luck there. I know that IE does what you
want to do so it can be done.

LS

Hi Lloyd, you're right that webbrowser control has no mouse hover
event unlike a simple button. Although this control is Internet
Explorer-based, it must have had hovering method as millions of IE
users use this funciton which allows users to see the hovered URL on a
status-bar before navigating.

A simple and verified code will be appreciated.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top