Archive for the 'Tutorial' Category

Replacing TWebBrowser with TMozillaBrowser

One thing that keeps me worried when installing a web based application in my client’s computer is the browser dependency. There’s usually something going wrong when porting my web application from my stable development environment to the client’s.

Sometimes a visit to the client’s computer is like opening a birthday present. We don’t know for sure whether the inside is good, useless, or full of crap. Various clients prefer various browsers, which generally result in either my CSS isn’t supported, some plug-ins reject my script, using a very old version of Internet Explorer, the screen is less than 1024×768 and we couldn’t find the video driver, or worse, all combined.

There are some alternatives:

  1. Making sure the client is using the exact same browser. This means the user cannot use their favorite browser anymore.
  2. Develop compatible software to all browser types there is. Quite another troublesome way, since the development cost and time will rise significantly. Not mentioning the user might try to upgrade to a different upcoming browser.
  3. Develop your own browser. TWebBrowser unit is good, but remembering it is using internet explorer engine, we cannot be certain which version is compatible.

The third option sounds valuable. But instead of TWebBrowser, we’ll be using TMozillaBrowser to develop our own browser using Mozilla ActiveX Control. The details can be found here.

How do we do that

Here’s a step by step solution: Read more »