Reputation: 329
I have a WebBrowser control inside a VB.Net 2008 application.
When I click a link inside the WebBrowser, it opens a new Internet Explorer Window. I do not handle the web page so I cannot in any way modify the Target property.
Is there a way in VB.Net to catch the Clicked Link and have it display inside the particular WebBrowser Control?
Upvotes: 1
Views: 206
Reputation: 962
Try this:
private void myWebBrowser_NewWindow(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
myWebBrowser.Navigate(myWebBrowser.StatusText);
}
Upvotes: 1