Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

about:blank problem when new window requested in vb web browser (visual basic 2012)

$
0
0
Hello,
I have created a web browser in visual basic 2012 and the problem is that, sometimes, when new window is requested, a new form opens with the adress about:blank. The fact that this does not happen always (other times it works properly) prevented me from taking in what's the matter. Here is the code for this:

Private Sub WebBrowser1_NewWindow(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser .NewWindow
Dim myElement As HtmlElement = WebBrowser1.Document.ActiveElement
Dim target As String = myElement.GetAttribute("href")

Dim New_Window As New Form1

New_Window.Show()
New_Window.WebBrowser1.Navigate(target)

e.Cancel = True

End Sub



And sth else: what's the "href"? :confused:

Should sb know the resolution of the problem, I will be most grateful to apply their suggestion.

Thanks in advance,
kostakost

You may send emails to kostakost@in.gr

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>