MSHTML Hosting – User Content

I have been posting about using MSHTML to display HTML-based content in your Windows applications. Some of the reasons I started doing this in my own code include:

  • Easy way to create a modern looking task-based UI.
  • Flexible and extensible, with a built-in script engine (JavaScript) and style system (CSS).
  • Based on open standards

There is another interesting by-product:

  • Very easy to allow end users to add their own custom HTML.

You’re running a full-blown web browser inside your application. All you need to do is provide some way for the user to specify their own URL. It could be from within the application UI or maybe a special registry key. You pass the URL to Navigate and their custom content appears in your application. What a great way to open your application to your end users.