Delphi Berlin How to have Delphi TWebbrowser component running in IE9 mode?

TWebbrowser控件使用IE版本默认是7, 即使你的电脑安装了IE11。如何更改为其他IE版本呢?在网上找到一个帖子,可以借鉴一下。


I am experiencing Javascript errors with TWebbrowser due to the fact that TWebbrowser is running in IE7 compatibility mode.

Is there a way to prevent this and just have it run in IE9 mode?


Answer:

   

  1. Opt in to the browser emulation feature using the documented registry key.
  2. Depending on the browser emulation setting that you selected, you may need to ensure that your document contains a suitable DOCTYPE. Again, this is described in thedocumentation.

So, for example, if you wish to make the simplest possible change you would add the following registry setting:

HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
   SOFTWARE
      Microsoft
         Internet Explorer
            Main
               FeatureControl
                  FEATURE_BROWSER_EMULATION
                     YourExeNameGoesHere.exe = (DWORD) 00009999

The documentation for the value 9999 says:

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

Were you to use 9000 then you'd need also to modify the DOCTYPE of your document:

9000 Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.

转自: http://stackoverflow.com/questions/25843845/how-to-have-delphi-twebbrowser-component-running-in-ie9-mode

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Create modern-looking & feature-rich Windows applications faster with well over 400 components in one money and time saving bundle for Delphi 7, 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.1 Berlin Starter Edition & C++Builder 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin Features Grid RichEditor TreeView Spell Check HTML Edit Planner Outlook / Inspector Bar Web connectivity Syntax highlighting memo System Graphic Menu Smooth Miscellaneous All components TMS Component pack v8.3.4.0 : update Sep 23, 2016: Update : TAdvDateTimePicker v1.2.5.0 - New : MinTime, MaxTime properties added Update : TAdvGridFilterPanel v1.0.4.0 - New : OnAppliedFilter event added - New : OnRemovedFilter, OnRestoredFilter events added - Improved : Loading filter from grid Update : T(DB)Planner v3.4.1.1 - New : Planner.Items.SelectAll method added - Improved : Handling of auto header sizing Update : TAdvCardList v2.2.2.0 - New : Swipe capability added Update : TAdvTreeView v1.1.0.6 - Improved: Handling keyboard ALT, SHIFT and CTRL keys without navigating to selecting item - Fixed: Issue drag & drop interaction in combination with expand / collapse Update : TAdvStringGrid v8.1.3.0 - Improved : DistinctValues function now returns distinct column values irrespective of hidden rows - Improved : Shift-Enter key handling for moving to the previous cell - Improved : AppendToCSV() can export to CSV also when no previous CSV exists - Fixed : Issue with FilterDropDownCheck = true and filter strings with spaces - Fixed : CellProperty property name for backwards compatibility - Fixed : Issue with SearchFooter & nodes - Fixed : Issue with zero width columns and floating footer display - Fixed : Issue with Undo handling for checkboxes - Fixed : Issue with combination of cell icon and cell balloon

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值