Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

NewWindow2

Posted on 2003-11-12
3
Medium Priority
?
378 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 150 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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