更改Web浏览器控件的默认浏览器模式 [英] To change default browser mode of webbrowser control

查看:1001
本文介绍了更改Web浏览器控件的默认浏览器模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试点击此链接如何在IE8 WebBrowser控件中以编程方式关闭怪癖模式? [
原则上,您可以使用ActiveX对象来实现它,但是最好避免使用它.将本地系统与Web应用程序隔离的想法是绝对正确的,重要的是不要破坏该原理.实际上,如果每个合理的用户知道您使用了这种肮脏的把戏,他们都会失去对您网站的信任.请听一个很好的友好建议:不要使用ActiveX,也不要尝试使Web应用程序可以访问本地系统和浏览器设置.

—SA


I am trying to follow this link How to programmatically turn off quirks mode in IE8 WebBrowser control?[^] to change the default behavior of my WebBrowser control but I can''t make it work.

I have added a new DWORD value in FEATURE_BROWSER_EMULATION, named the file as abc.exe (abc is my application name) and modified its data to 13880 (also tried Hex: 0x1F40), still my webbrowser control is in quirks mode. Am I doing something wrong here?

FYI my application is a web application, not windows application.

解决方案

This question would make some sense and be interesting (for some IE users, at least) if not "my application is a Web application". Apparently, Web applications do not have access to Web browser options and to the local system. Thank goodness they don''t!

In principle, you could implement it using ActiveX object, but it''s the best to avoid it. The idea of isolation of the local systems from Web application is absolutely right, its important not to break this principle. Actually, every reasonable user would loose trust to your site if she/he knew you use such dirty tricks. Listen to a good friendly advice: no ActiveX, and no attempts to give a Web application any access to local system and browser settings.

—SA


这篇关于更改Web浏览器控件的默认浏览器模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆