The title says it all. I'm using a system.windows.forms.webbrowser control and I am allowing navigation, but if a link tries to open in a new window, it should open in the same (in the webbrowser from my program). How can I accomplish that?
For starters, look at the NewWindow event. I believe that it is raised (and allows you to cancel) if any kind of popup is going to be shown. As far as intercepting the url to navigate to, I can't help you with that.
If I'm not wrong there's an event raised when a link is clicked. Process that event yourself and cancel the default action... worked fine for me (in win32)...
OK I managed somehow to take the link out of the activeElement. The problem is there are a lot of ways to open a new browser window: like html link or javascript function or etc etc
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.