Solved

NewWindow2

Posted on 2003-11-12
3
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 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