IWebBrowser2 object behaves as IE7, instead of the IE version installed on the machine RRS feed

  • Question

  • I'm developing on a Win7 machine with IE8 browser (same thing occurs also on IE9).

    I've create an application with an IWebBrowser2 object embedded within a native window.
    Within that browser object i execute a javascipt code:

     var txt = "Browser Name: " + navigator.appName + "\n";
     txt += "Browser Version: " + navigator.appVersion + "\n";

    and i receive the following alert:

    Browser Name: Microsoft Internet Explorer
    Browser Version: 4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)

    (notice that browser version is MSIE 7.0).

    That confirmed my earlier worries - even when having IE8\IE9 installed on my machine - the IWebBrowser2 object behaves as if it was IE7 (including all of the annoying HTML\CSS behaviors).

    Does anyone know why this is? or better - if there is any possibility to embed a browser object as IE8\IE9 (for distribution - so it should be legal)


    Tuesday, August 2, 2011 3:44 PM

All replies

  • Browser Emulation

    For applications hosting the WebBrowser Control, the default value is 7000.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, August 2, 2011 9:38 PM