How to catch new window

akbdas
08-09-2002, 03:22 PM
dear masters,
i am using wenbrowser control to simulate the behaviour of internet explorer but i am unable to catch new window ( pressing ctrl-N) to replicate the window.
when i am doing i am getting internet explorer but not my explorer. so pl. help to cat it.
thanking you
das

bionicdonkey
08-10-2002, 04:06 PM
Try this

Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim frmWB As WebBrowser1
Set frmWB = New WebBrowser1

frmWB.WebBrowser.RegisterAsBrowser = True
End Sub

also

Private Sub newWindow()

Static NoOfWindows As Long
Dim newForm As WebBrowser1
NoOfWindows = NoOfWindows + 1
Set newForm = New WebBrowser
newForm.Show

End Sub

I use this to call a new window from a menu button

ChiefRedBull
08-10-2002, 05:23 PM
I think akbdas is trying to 'catch', or stop new windows appearing. If so, simply set Cancel = True in the NewWindow event.

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

' cancel the new window
Cancel = True

End Sub

bionicdonkey
08-10-2002, 09:59 PM
sorry...i must have mis understood

Bionic Donkey

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum