08-06-2017 11:54 PM
I'm attempting to embed a modern version of IE inside a CVI application, and not have CVI just launch an IE window.
I've looked at the activex\WebBrowser demo project and it does exactly what I want, it's just that the version of IE that loads embedded is IE7. Basically no javascript loads and runs correctly in IE7, which means it's essentially worthless to me. forums.ni.com can't even load correctly.
I took a peek at activex\iedemo project, and it loads and runs IE11 on my machine which is exactly what I want, it's just not embedded.
Has anyone successfully done this before, and can you provide some details? I'm using CVI2015.
Solved! Go to Solution.
08-07-2017 06:03 PM
Hello, Kevin,
Sounds like this could be on the Microsoft/ActiveX side and not the CVI side. See these forum posts. It seems you may be able to tweak some settings in IE.
internet explorer 11
https://stackoverflow.com/questions/26151999/ie11-prevents-activex-from-running
08-07-2017 07:46 PM - edited 08-07-2017 07:50 PM
Thank you!
Your first link actually doesn't have anything to do with the issue. That's referencing browser plugins and isn't related at all.
Your second link contains the solution. Apparently when using the WebBrowser ActiveX control, you must tell Windows what version of IE to "emulate" otherwise it defaults to IE7 (you know... because that seems smart).
In regedit I opened up
Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
And added a DWORD value with the exact name of my application and a value of '2af9' (11001) and upon restarting my application (didn't need to reboot) my user agent is now reported as IE11 and I have no more issues. If I needed to use a different version of IE the list of DWORD values is here.
I actually had to add entries for my_application.exe and my_application_dbg.exe so that it worked in both debug and release modes.