This works like magic, I've had a sad time when Google stopped working and this could have fixed it, I didn't have my program for a long time for a stupid reason.
Get the WebBrowser control to show modern contents:
The WebBrowser control uses the same Internet Explorer version which is installed on your OS but it doesn't use the latest document mode by default and shows content in compatibility mode.
As a symptom, you can see the site in Internet Explorer, but WebBrowser control doesn't show the site correctly and for some sites it shows script error too.
Solution:
You can tell the WebBrowser control to use the latest document mode without compatibility mode in WebBrowser control. You can follow instructions here to disable the setting using registry.
This sets IE version in the current process to 99999 which means the maximum version.
var appName = System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe";
using (var Key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true))
{
Key.SetValue(appName, 99999, RegistryValueKind.DWord);
}
What Happens if I Set the FEATURE_BROWSER_EMULATION Document Mode Value Higher than the IE Version on the Client?
Obviously, the browser control can only support a document mode that is less than or equal to the IE version installed on the client. Using the FEATURE_BROWSER_EMULATION key works best for enterprise line of business apps where there is a deployed and support version of the browser. In the case you set the value to a browser mode that is a higher version than the browser version installed on the client, the browser control will choose the highest document mode available.
My program and source code are here:
https://sites.google.com/site/workofmylife1234/