views:

118

answers:

2

I'm making an html autorun, loading it with default browser has lots of issues, rendering inconsistencies, and more issues when it's loaded internet explorer like users has to click on allow at the top when some javascript is loaded etc. What is the best solution to create a small standalone app with just a full browser control in it which will load an html file say index.html from the application path.

That is if I have browser.exe in a cd, it will load index.html from the cd directory. The browser should be based webkit or Gecko. So far i have been using xulrunner... but its a overkill especially when the file to load is just few kbs. Its using lot of system resources.

I have experience in vb.net(but it requires the .net framework) and php on windows. And basic python, c and javascript. Where should i start and what are your suggestions?

Update: This is meant to be a wrapper or a chromeless browser that will load the html. So the only functionality needed is autorun and load the html in full screen, thats it! So air, .net etc wont do the work. It should be an standalone exe.

A: 

I would use Adobe Air: http://www.adobe.com/devnet/air/

Matt Williamson
Air can't be used for autorun. And it won't work without air installed.
esafwan
A: 

As no answer for this, I will post how you can use XULRunner for this purpose. Getting Started etc could be found here. I'm just putting my layout code in which how I achieved a chrome less browser window that loads my particular page for autorun purpose.

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="Edusoft" hidechrome="true" sizemode="maximized" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&gt;

<!--This Sets the browser control and loads index.html and sets clip menu as the popup menu -->
<browser id="1" type="content" src="chrome://myapp/content/theme1/index.html" flex="1" context="clipmenu"/>

<!-- Clips menu -->
<popupset>
  <menupopup id="clipmenu">
       <menuitem label="Go Back" oncommand="document.getElementById('1').goBack()"/>
       <menuseparator/>
       <menuitem label="About" oncommand="" />
       <menuseparator/>
       <menuitem label="Exit" oncommand="close();" />
  </menupopup>
</popupset>

</window>

This is the window that loads first when XULRunner is run. It's defined in prefs.js Thing will be clear when you read through this.

esafwan