1

I am writing an application in VB.Net that is using the standard Web Browser control. I went to YouTube.com with my application and the page had a message saying I was using IE7. I since have checked multiple places and thay all reported my application running IE7, but I have IE9 installed. I visited the same places using the standard installed web browser and the same web sites said I was using IE9. I assume in my application the Web Browser control is switching to IE7 compatability mode. I went to the reg and tried to add my application to the FEATURE_BEHAVIORS but this did not work and still said I was using IE7. When I tried the this I was running my application from VS2010 so I don't know but this may have been part of the problem of why the reg change had NO effect. My main question is, How do I get the Web Browser control to NOT run in compatablity mode as I develop the application in VS2010.

Vb.Net,Vista Home Premium Service Pack 2,Visual Studio 2010 Ultimate

Ken Falcon
  • 11
  • 1
  • 2
  • possible duplicate of [Regarding IE9 WebBrowser control](http://stackoverflow.com/questions/4612255/regarding-ie9-webbrowser-control), [WebBrowser control to use IE9](http://stackoverflow.com/q/5531452), [Is it possible for the .NET WebBrowser control to use IE9?](http://stackoverflow.com/q/3346007), [How can I make sure the embeded browser control uses Internet Explorer 9?](http://stackoverflow.com/q/9489346) – Cody Gray - on strike May 19 '12 at 01:15

1 Answers1

1

The Actual Key is FEATURE_BROWSER_EMULATION and not FEATURE_BEHAVIORS

Here is Inno Setup script to enable this feature

[Setup]
AppName=Browser Patch
AppVersion=1.0.0.0
AppID={{D1A4934F-E67B-44CF-A8E2-07A8CFEDFAB3}
AlwaysRestart=false
ChangesEnvironment=true
OutputBaseFilename=Patch
PrivilegesRequired=admin
ShowLanguageDialog=no
DisableWelcomePage=True
DisableReadyPage=True
DisableReadyMemo=True
DisableFinishedPage=True
AllowCancelDuringInstall=False
CreateAppDir=False
DisableProgramGroupPage=yes
Uninstallable=no
SolidCompression=True
Compression=lzma2/ultra
InternalCompressLevel=ultra
CompressionThreads=2
UsePreviousAppDir=yes
ArchitecturesInstallIn64BitMode=x64
VersionInfoVersion=1.0.0.0
VersionInfoCompany=Company Name
VersionInfoDescription=Registry Patch
VersionInfoCopyright=Company Name
VersionInfoProductName=Company Name Registry Patch
VersionInfoProductVersion=1.0.0.0
AppPublisher=Your company name

[Registry]
;Current User
Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x2711"

;Local Machine
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x270f"

;64 Bit Mode
Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x2711"; Check: IsWin64
Prads
  • 71
  • 2
  • 4