Creating HTA applications with Internet Explorer 5

by Jan Verhoeven, 14 May 2000

Internet Explorer 5 allows the creation of complete windows applications.

HTML applications have the .hta extension. When you load a HTA file in Internet Explorer 5 the normal safety rules are not applied anymore. Without warning you can activate ActiveX controls and have access to the hard disk with the FileSystemObject.

This opens up a whole range of possibilities using a combination of:

I will not give a tutorial here but present to you working examples that you can download from this page and run on your own machine. The downloads are very small compared to the other programs that you find on this site. The reason for this is that almost everything the program needs is allready on your machine.

HTML Editor

This provides a basic HTML editor from within your IE5 browser. It demostrates the use of the Common Dialog Control to select files and colors, and the use of HTC components and DHTML to create menu's. Looking at the framework given, you can easily extend this application to suit your own needs.

Download (19kb - 2 May 2000).

HTML Drawing Application (modified 12 May 2000)

This provides a drawing program from within your IE5 browser. I have turned my Delphi graphics workhorse into an ActiveX control that you can use within any environment, like IE5, that supports ActiveX.

Download (22kb - 12 May 2000).

For the application to work you must also Download (385kb - 12 May 2000), unzip and register the janDrawHostpx.ocx ActiveX control.

See ActiveX Registration for details.

HTML Programming Application (14 May 2000)

This provides a programming environment within your IE5 browser to learn and practice Visual Basic Script. Use it at home or at school and feel free to extend and mofify.

Download (11kb - 14 May 2000).

For the application to work, you must also Download (254kb - 14 May 2000), unzip and register the janHLEditHostpx.ocx ActiveX control.

See ActiveX Registration for details.

How to Register ActiveX controls?

The example is given for janDrawHostpx.ocx but applies to all ActiveX controls.

  1. Download and unzip in any directory
  2. Register the ActiveX control with Start - Run - Browse
  3. In the dialog box browse to and select e.g. janDrawHostpx.ocx
  4. Preceed this with regsvr32
  5. The command line should now read something like
    regsvr32 c:\comobjects\janDrawHostpx.ocx
  6. Click OK in the dialog box.

If at any time you want to remove the ocx proceed as follows:

  1. Proceed the same as when registering the ocx control. Only this time you have something like the following on your command line
  2. regsvr32 /u c:\comobjects\janDrawHostpx.ocx
  3. Please note the /u after the regsvr32
  4. Delete janDrawHostpx.ocx from your harddisk.