how to access Iwebbrowser2.scripterrorssuppressed from visual studio 2008

711 Views Asked by At

I have Visual Studio 2008, which comes with program files/microsoft sdks/windows/v6.0a/include/ExDisp.h Which defines iWebBrowser2. The header file is missing many of the properties and methods documented on .NET 2+ Specifically, scripterrorssuppressed is missing. Have installed .NET 4.5, but am mystified where it went. I have both Program files (64 bit) and Program files (x86) (32 bit), but looking through them for new "sdk's" was not helpful. Re-installing .NET 4.5 just says "I'm already installed", and no information on where it was installed.

So, is it possible to upgrade the iWebBrowser2 I am using to a more recent version, while running visual studio 2008 (aka Visual Studio 9.x)?

Can anyone point me to my .NET 4.x installed SDK?

1

There are 1 best solutions below

0
On

It is not possible to upgrade IE's API to find more members. COM interfaces are immutable.

Your problem is that you expect the IE ActiveX to have the same properties and methods with .Net's wrapper class, which provides functionalities not only from the ActiveX itself, but also from the ActiveX container specifically designed for the webbrowser ActiveX control in Windows Forms.

There is no such thing as IWebBrowser2::ScriptErrorsSuppressed - the native way to suppress script error is modify your ActiveX container so it handles the OLECMDID_SHOWSCRIPTERROR command in a way that no UI is displayed.