Elias
Elias

Reputation: 1427

Winform WebBrowser Not Displaying CSS

I am trying to navigate to Flying Toasters in the Winform WebBrowser Control, but the animation seems to hang at the first frame. I am guessing this is a compatibility issue with the web browser because when I navigate to other websites it says "IE7 and IE8 are no longer supported". Why is this happening and is there any way I can fix this?

Frozen CSS

Upvotes: 1

Views: 1435

Answers (1)

Mikael Engver
Mikael Engver

Reputation: 4768

Internet Explorer 7 rendering will be used if you do not override the Feature Browser Emultate setting in the registry.

For your user (Current User) only use this key:

  • HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

For all users on the computer/server use this key:

  • On 64 bit app on 64 bit- or 32 bit app on 32 bit machine:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

  • On 32 bit app on 64 bit machine:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

For example if your executable is named flying_toaster.exe. You will have to add an DWORD entry with the name flying_toaster.exe and with a value 11001 (to use Internet Exlporer 11-rendering).

enter image description here

A complete list of values is listed below (quoted from MSDN):

11001 (0x2AF9) Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the !DOCTYPE directive.

11000 (0x2AF8) IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11.

10001 (0x2711) Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.

10000 (0x02710) Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.

9999 (0x270F) Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

9000 (0x2328) Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9. Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.

8888 (0x22B8) Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

8000 (0x1F40) Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8 Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.

7000 (0x1B58) Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control.

Read more about the in this blog post "Web Browser Control – Specifying the IE Version"

Also look into the MSDN Documentation about Feature Controls.

Upvotes: 1

Related Questions