i am making a browser in vb 2005 beta but sometimes when i click a link it opens in a new window in Internet Explorer now how can i have it so it opens in a new version of my own browser or a browser on a second form
any help would be greatly apreciated.

New Window
bdc604
Pete1
To add a Event in a control, select the control, goto properties window, press the lightning button on the top. That will list the available events in the control...
Just DoubleClick on the textbox to add a defaultname event, or you could simply specify one...
cheers,
Paul June A. Domag
doukig
Breetai7018
Private Sub WebBrowser1_NewWindow2(ByVal ppDisp As Object, ByVal Cancel As Boolean)
Cancel =
True End Subcoolstyle
i used everything it said there, but are you saying i only should use a part of the code
Another option for me would be like i said an option close the popup warning automaticly.
Kyle_W
Ripthorn
You could try handling the NewWindow event of the webbrowser control...
cheers,
Paul June A. Domag
novices
OFord
Could you try posting the code
Coz vb6 code normally wouldn't run on vb.net there are some conversions to be done...
cheers,
Paul June A. Domag
dotmsi
What you need is an extended NewWindow event, that provides the Url. This post contains code to do that.
nogChoco
Just to be clear, you used the extended NewWindow event, grabbed the Url it was going to open, cancelled the event, and then launched a new instance of your browser application passing in the Url
RudieVanHout
This looks like VB6 code. Here is what the .NET code should look like, assuming the webbrowser control is named WebBrowser1...
Private Sub WebBrowser1_NewWindow(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
MessageBox.Show("NewWindow event.")
e.Cancel = True
WebBrowser1.Navigate(WebBrowser1.StatusText)
End Sub
The trick is, the event args don't provide the Uri to which the new window is navigating, so you can cancel the NewWindow, but then what I used the StatusText in this snippet. When you mouse over links, the StatusText contains the href for the link. I wouldn't rely on this, however, because this won't work for javascript Open client-side script.
Cypry
Rulez