Windows 10, IE Web Browser Control, and FEATURE_BROWSER_EMULATION

I’ve got a Visual FoxPro app that uses the Microsoft Web Browser ActiveX control as the primary UI.

A few years ago, I needed to “upgrade” the pages being rendered by the Web Browser Control to a more modern look and feel (think HTML5), and found that many of the changes I had made simply weren’t working – all thanks to the Web Browser Control using IE7 rendering mode.

That’s when I discovered the FEATURE_BROWSER_EMULATION registry key (thanks to Rick Strahl).  Rick has written about this key several times on his blog:

Web Browser Control – Specifying the IE Version (May 11, 2011 – Updated 7/19/2014)

Make Your CHM Help Files Show HTML5 and CSS3 Content (February 15, 2012)

HTML5 and CSS3 Editing in Windows Live Writer (July 8, 2013)

After reading Rick’s original post, I took the “clever” way out by adding the registry key to my InnoSetup script, and setting the Value of the key to zero (0).  Setting the key to zero tells the Web Browser Control to render pages using the currently installed version of IE on the users computer.

This has worked well for me the past couple of years.

Until this weekend.

On Saturday, I updated my Windows 10 virtual machine to Build 10130, and started up my app.

The app loaded fine, but instead of rendering the “home” page as it should, there was nothing but a blank white area where the Web Browser Control sits.  Even worse, when I closed the app, the EXE continued running in Windows Task Manager.  This is a problem, since I prevent more than one instance of the app from running on a machine.  Double-clicking the icon to start the app again did nothing, as the EXE was still running – but was invisible.

After trying several different things to get the page to load, I finally removed the registry key for FEATURE_BROSWER_EMULATION for the application EXE – I restarted the app, and it rendered the pages perfectly.

I’ve jumped through several different values for the registry key, and it seems no matter which value I choose the Web Browser Control (in Windows 10 Build 10130) renders the pages based on the version of Internet Explorer that is installed (in my case, IE 11).

This piqued my curiosity for other versions of Windows, and it appears I can set the decimal value for FEATURE_BROWSER_EMULATION to 11000 (IE11 Standards mode) for all OSes from XP forward to ensure the Web Browser Control will render pages based on the version of Internet Explorer that is installed.  In Windows XP (which can only go to IE8, the pages rendered as I expected them to render for IE8).

 

 

 

Southwest Fox 2015 Speakers and Sessions

Speakers and sessions for the Southwest Fox and Southwest Xbase++ conferences have been announced!

The Southwest Fox 2015 Conference has fewer speakers and tracks this year (eight and two, respectively), but there is a chance that more speakers could be added, depending on the number of registrations by July 1st.

The list of speakers for 2015 is impressive:

  • Toni Feltman
  • Tamar Granor
  • Doug Hennig
  • Cathy Pountney
  • Rick Schummer
  • Phil Sherwood
  • Rick Strahl
  • Christof Wollenhaupt

You can view specific session details at the Southwest Fox 2015 Sessions page. Two sessions I’m really interested in are Tamar’s “Can’t This Application Go Any Faster?” and Doug’s “50 Shades of Grey: Whipping Your Application’s UI Into Shape“.

Southwest Fox 2015 is the only Visual FoxPro developer’s conference in North America. If you’ve never been, I highly recommend making an effort to go this year.  It’s a great learning experience, shared with fellow Visual FoxPro developers.

A few of the Southwest Xbase++ sessions for 2015 have piqued my interest, too.

The conferences will be held October 15-18 at the SanTan Elegante Conference Center in beautiful Gilbert, Arizona.

Registration starts June 1st, with the same registration fee as last year!

I’m looking forward to going this year. Hope to see you there!