|
-
Feb 26th, 2003, 01:09 PM
#1
Thread Starter
Fanatic Member
Webbrowser question
With the WebBrowser object this is called as I open a new window
WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
But how can I extract the URL of the new window?
-
Feb 26th, 2003, 01:21 PM
#2
You could put another hidden browser on the form, and do this...
VB Code:
Private Sub Command1_Click()
WebBrowser1.Navigate "http://www.vbforums.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim wb As New WebBrowser_V1
Set ppDisp = WebBrowser2.Object
End Sub
Private Sub WebBrowser2_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, _
Flags As Variant, TargetFrameName As Variant, _
PostData As Variant, Headers As Variant, _
Cancel As Boolean)
MsgBox URL
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Feb 26th, 2003, 01:42 PM
#3
Thread Starter
Fanatic Member
Originally posted by crptcblade
You could put another hidden browser on the form, and do this...
VB Code:
Private Sub Command1_Click()
WebBrowser1.Navigate "http://www.vbforums.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim wb As New WebBrowser_V1
Set ppDisp = WebBrowser2.Object
End Sub
Private Sub WebBrowser2_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, _
Flags As Variant, TargetFrameName As Variant, _
PostData As Variant, Headers As Variant, _
Cancel As Boolean)
MsgBox URL
End Sub
That's ingenious - thanks
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
|