Why are NewWindow2 & NewWindow3 events missing?

K

kimiraikkonen

Hi,
In VB 2005 express, i didn't see any events such "NewWindow2" and
"NewWindow3" as stated in MSDN or other websites. Only "NewWindow" is
present.

Only "newwindow" is there:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.ComponentModel.CancelEventArgs) Handles
WebBrowser1.NewWindow
' Code
End Sub

Why?
 
K

kimiraikkonen

There shouldn't be any events like that.

See:http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrow....

 -Teemu

Teemu,
Thanks for the reply, but i saw these events, are there related to
others?:
http://support.microsoft.com/kb/311282
http://www.xtremevbtalk.com/archive/index.php/t-260670.html
http://msdn2.microsoft.com/en-us/library/aa768337(VS.85).aspx

and much more... says XP SP2 supports newwindow2 + 3 though i have XP
SP2 but no events in webbrowser control in VB 2005 express. Aren't
they provided natively or additional declaration is needed?

Thanks.
 
H

Herfried K. Wagner [MVP]

kimiraikkonen said:
Thanks for the reply, but i saw these events, are there related to
others?:
http://support.microsoft.com/kb/311282
http://www.xtremevbtalk.com/archive/index.php/t-260670.html
http://msdn2.microsoft.com/en-us/library/aa768337(VS.85).aspx

and much more... says XP SP2 supports newwindow2 + 3 though i have XP
SP2 but no events in webbrowser control in VB 2005 express. Aren't
they provided natively or additional declaration is needed?

These events are unfortunately not exposed by the managed wrapper around the
unmanaged WebBrowser (COM/ActiveX) control.
 
A

Armin Zingler

kimiraikkonen said:
Hi,
In VB 2005 express, i didn't see any events such "NewWindow2" and
"NewWindow3" as stated in MSDN or other websites. Only "NewWindow"
is present.

Only "newwindow" is there:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.ComponentModel.CancelEventArgs) Handles
WebBrowser1.NewWindow
' Code
End Sub

Why?


I only see the NewWindow2 and NewWindow3 events. No NewWindow event
available. My shdocvw.dll version is 6.0.2900.3231


Armin
 
T

Teemu

I only see the NewWindow2 and NewWindow3 events. No NewWindow event
available. My shdocvw.dll version is 6.0.2900.3231

Have you made a direct reference to this ActiveX component? It might allow
to see those events which can't be seen via .NET's WebBrowser control.

-Teemu
 
C

Cor Ligthert[MVP]

Kimi,

Most documentation about the webbrowser on MSDN is about the AXWebbrowser,
in fact shdocvw.dll

In net 2005 is a new class around that introduced, which has some properties
that even inplements using that MSHTML and a much nicer way to handle the
DOM (document).

The backside of it, is that it has less events then the true AXWebbrowser
has. (In fact has Herfried writtem an othwer way already).

Cor
 
K

kimiraikkonen

Have you made a direct reference to this ActiveX component? It might allow
to see those events which can't be seen via .NET's WebBrowser control.

-Teemu

I suspected the same and referenced shdocvw.dll into toolbox to make
it visible on my form. And now these events are available. But i'm
disappointed that these events aren't included in .NET's Web Browser
control wrapper, because i was used to work with it.

Armin, the version of shdocvw.dll seems 1.1, probably package version.
The file version is 6.0.2900.2180.

As i stated, this seems an older version that .NET's webbrowser
control which is disappointment.
 
A

Armin Zingler

Teemu said:
Have you made a direct reference to this ActiveX component? It might
allow to see those events which can't be seen via .NET's WebBrowser
control.

Yes, I added the AX control to the toolbox because Kimi posted the link
http://support.microsoft.com/kb/311282. I only read
"AxWebBrowser1.Navigate(TextBox1.Text)" in the example and therefore
thought he is using the AX control.


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top