Solved

NewWindow2

Posted on 2003-11-12
3
330 Views
Last Modified: 2013-12-25
In Visual Basic 6, I'm created a MDI browser, however I'm not entirely sure how the NewWindow2 function works for trapping new windows. Can someone give me an example of how it works? Thanks in advance.

Alex
0
Comment
Question by:AlexSeifert
  • 2
3 Comments
 
LVL 1

Expert Comment

by:TrevorParnhamntl
ID: 9854033
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)



' Create new instance of form
Set frmWB = New frmWeb
   frmWB.Visible = False

   frmWB.WebBrowser1.RegisterAsBrowser = True

   Set ppDisp = frmWB.WebBrowser1.object



'   frmWB.Visible = True
   
   frmWB.WebBrowser1.Visible = True
   
   
   
   
'   frmWB.WebBrowser1.Left = frmWB.Left
'   frmWB.WebBrowser1.Top = Me.Top


 'ppDisp.Left = frmWB.Left
'
'
''frmwb_GotFocus
'
'
frmWB.Left = 1800
frmWB.Top = 2300
WebBrowser1_Validate (Cancel)




End Sub
0
 
LVL 1

Accepted Solution

by:
TrevorParnhamntl earned 50 total points
ID: 9854056
Sorry, sent previous answer with some of my doodling. This is the correct code you need

Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)



' Create new instance of form
Set frmWB = New frmWeb
   frmWB.Visible = False

   frmWB.WebBrowser1.RegisterAsBrowser = True

   Set ppDisp = frmWB.WebBrowser1.object

   
   frmWB.WebBrowser1.Visible = True
   
   
End Sub
0
 

Author Comment

by:AlexSeifert
ID: 9854070
Thanks!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Share codes 68 115
VB 6.0 printer how to align 6 50
Using "ScreenUpdating" 6 47
Sending a email via excel using vba 6 58
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now