LoginSignup
14

More than 5 years have passed since last update.

WebBrowserで使用するIEのバージョンを変える方法

Posted at

はまったのでメモ。
VisualC#でWebBrowserを使って、Webページを表示するとき、使用されているIEのバージョンが7と古くて崩れてしまうページが多い。

なので、使用するIEのバージョンを変更してあげる必要がある。

レジストリエディタを起動して、以下にキーを追加する。

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

たとえば、WebDriverApp.exeをIE11で動かしたい場合は以下のように、
WebDriverApp.exeという名前のキーをを追加すればよい。REG_DWORD=11000(10進数)

capture.png

VISUALStudioでデバッグしたいときは.vshost.exeも忘れずに。

HKEY_LOCAL_MACHINEでも行けると思うのだけど、私の環境では無視されてしまった。(権限の問題だと思うけど)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14