Home > Article > Backend Development > How Can I Improve Web Browser Control Emulation in Visual Studio 2013?
Registry Tweaks for Web Browser Control Emulation
When using Visual Studio 2013 to create web browser control applications, adjusting certain registry settings can enhance emulation capabilities, particularly for IE9 and above.
The "FEATURE_BROWSER_EMULATION" Key
The key in question is "FEATURE_BROWSER_EMULATION" within the registry path "HKEY_LMSOFTWAREMicrosoftInternet ExplorerMainFeatureControl". As the user reported, setting the value of "myApp" to 9999 enables IE9 emulation, while values of 10001 and higher result in failures, especially with date pickers.
Disabling "FEATURE_NINPUT_LEGACY_MODE"
The key "FEATURE_NINPUT_LEGACY_MODE" also plays a role in web browser control emulation. Setting it to 0 (disabled) has been observed to resolve the issue faced with the Dojo Toolkit calendar demo, allowing the date picker to function correctly.
Additional Features
In addition to the two keys mentioned above, the provided code includes a "SetWebBrowserFeatures()" method that enables several other useful features, such as:
Code Playground
The provided C# code sample demonstrates how to use the registry keys and features to enhance emulation in a web browser control. It includes methods for setting browser emulation mode, dynamically loading and polling HTML content, and accessing the DOM document of the loaded page.
The above is the detailed content of How Can I Improve Web Browser Control Emulation in Visual Studio 2013?. For more information, please follow other related articles on the PHP Chinese website!