<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ClixieTrax &#187; Tutorial</title>
	<atom:link href="http://www.clixiesoft.com/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clixiesoft.com</link>
	<description>My bit by bit daily journey</description>
	<lastBuildDate>Mon, 26 Apr 2010 09:41:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Replacing TWebBrowser with TMozillaBrowser</title>
		<link>http://www.clixiesoft.com/2008/08/replacing-twebbrowser-with-tmozillabrowser/</link>
		<comments>http://www.clixiesoft.com/2008/08/replacing-twebbrowser-with-tmozillabrowser/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 10:35:22 +0000</pubDate>
		<dc:creator>Teddy Darmadi</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.clixiesoft.com/?p=53</guid>
		<description><![CDATA[One thing that keeps me worried when installing a web based application in my client&#8217;s computer is the browser dependency. There&#8217;s usually something going wrong when porting my web application from my stable development environment to the client&#8217;s.
Sometimes a visit to the client&#8217;s computer is like opening a birthday present. We don&#8217;t know for sure [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that keeps me worried when installing a web based application in my client&#8217;s computer is the browser dependency. There&#8217;s usually something going wrong when porting my web application from my stable development environment to the client&#8217;s.</p>
<p>Sometimes a visit to the client&#8217;s computer is like opening a birthday present. We don&#8217;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&#8217;t supported, some plug-ins reject my script, using a very old version of Internet Explorer, the screen is less than 1024&#215;768 and we couldn&#8217;t find the video driver, or worse, all combined.</p>
<p>There are some alternatives:</p>
<ol>
<li>Making sure the client is using the exact same browser. This means the user cannot use their favorite browser anymore.</li>
<li>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.</li>
<li>Develop your own browser. TWebBrowser unit is good, but remembering it is using internet explorer engine, we cannot be certain which version is compatible.</li>
</ol>
<p>The third option sounds valuable. But instead of TWebBrowser, we&#8217;ll be using TMozillaBrowser to develop our own browser using <a href="http://www.iol.ie/~locka/mozilla/mozilla.htm" target="_blank">Mozilla ActiveX Control</a>. The details can be found <a href="http://www.paranoia.clara.net/articles/taming_the_lizard_with_delphi.html" target="_blank">here</a>.</p>
<p><strong>How do we do that </strong></p>
<p>Here&#8217;s a step by step solution:<span id="more-53"></span></p>
<ol>
<li>Download and install <a href="http://www.iol.ie/~locka/mozilla/mozilla.htm" target="_blank">Mozilla ActiveX Control</a>.</li>
<li>Run Delphi (in this case, I&#8217;m using Delphi 7)</li>
<li>Component -&gt; Import ActiveX Control -&gt; Choose Mozilla Control 1.0 Type Library (Version 1.0)</li>
<li>If the component isn&#8217;t there, you have to register the DLL first by running <code>regsvr32 mozctlx.dll</code> at the command prompt.<code><br />
</code></li>
<li>Click Install. A new component will appear at ActiveX tab.</li>
</ol>
<p>That&#8217;s all there&#8217;s to it. Using the component is pretty much the same with TWebBrowser, albeit the green color and its inability to resize at design time are pretty annoying. The latter one can be resolved by dropping the component into a TPanel, setting the Align to alClient. You can now resize the panel.</p>
<p>I&#8217;m still trying to communicate the browser with the JavaScript inside the web application though. This can be quite a hard work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clixiesoft.com/2008/08/replacing-twebbrowser-with-tmozillabrowser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
