|
-
Oct 3rd, 2007, 02:13 PM
#1
Thread Starter
Hyperactive Member
[2005] new window event...
hi, i am making a webbrowser with the webbrowser control, i want to open a new window when the user click open link in a new window, i want it to open the form created by me , instead of internet explorer.. any idea of how to do this...
-
Oct 3rd, 2007, 02:40 PM
#2
Junior Member
Re: [2005] new window event...
 Originally Posted by Pac_741
hi, i am making a webbrowser with the webbrowser control, i want to open a new window when the user click open link in a new window, i want it to open the form created by me , instead of internet explorer.. any idea of how to do this...
maybe try to create another form, call the form and pass a parameter to a friend variable on the form such that it is the address that you want to open in the new window.
e.g.
Code:
Public Class Form2
Friend strWebURL As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If strWebURL <> "" Then
WebBrowser1.Navigate(strWebURL)
End If
End Sub
End Class
and your calling form something like this:
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm As New Form2
frm.strWebURL = "asdf"
frm.Show()
End Sub
End Class
-
Oct 3rd, 2007, 02:55 PM
#3
Re: [2005] new window event...
I don't have many examples up on my new site, but this is actually one of them.
http://www.zerosandtheone.com/exampl...erControl.aspx
-
Apr 24th, 2008, 09:17 PM
#4
Junior Member
Re: [2005] new window event...
kleinma, your link does not work...
Server error...
I am looking for the answer to this, but the ones I find don't work.
-
Apr 25th, 2008, 12:02 AM
#5
Re: [2005] new window event...
Yes I know, my site is currently offline for a restructure. I plan on having it back up in a few days.
I have the code at work though, so I can post it here tomorrow.
-
Apr 25th, 2008, 09:15 AM
#6
Junior Member
Re: [2005] new window event...
I found my answer was to add the Microsoft Web Browser component so I had access to NewWindow2 event (ieframe.dll), instead of using the one that came with .NET
-
Apr 25th, 2008, 09:38 AM
#7
Re: [2005] new window event...
yes you can do that, however it does require a few extra hoops to jump through.
You need to distribute a few extra files (the Ax interop ones that get generated). You also need to run those files through a command line utility to strong name them if you plan on strong name signing your app.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|