|
X.App Info
X.App is a free, open-source progam that allows you to
create applications out of ActiveX controls, or, to
be more precise, executables that open HTML documents embedding
ActiveX controls. The executables are free to modify and
distribute separate from the entire X.App program, with no
type of license required. You are also free to modify the
executable forms' source code, compile new files, and distribute
those. I am hoping that users will develop new innovations for
X.App that I can make available on this site. All versions of
X.App are free to modify and distribute as well.
How it works
I plan to put up more detailed information on the
functioning of X.App sometime in the future, so users may
better understand and add on to the program. For now, though,
this excerpt from the readme file explains the general idea:
An application created by X.App contains
several key files: an HTML file that embeds the necessary control,
a text file holding some application properties, the application
file itself, and a batch files that handles the running of the
program. If you browse the directory where X.App was installed,
you should see, among others, the following:
- XApp.html
- xapp.txt
- exit
- XTemplate1.exe
- XTemplate2.exe
- XTemplate3.exe
- XTemplate4.exe
The first three files must be included in every X.App application.
Their content is modifiable, but their names CANNOT be changed.
One of the XTemplate files, and a batch file that loads it, will
also exist in some form in all applications, with user-definable
names. The total size of all these files is only about 15KB, and
they are all free to distribute.
When X.App creates and application, it is acutally writing HTML code
that embeds the ActiveX control you specify into a copy of the
XApp.html file, and creating a template form with an embedded browser
control that points to this HTML file. The template form reads the
xapp.txt file to determine how it should look, and checks the exit
file to learn if the control has terminated operation. The batch file
loads up the form executable, and can be modified in Windows Explorer,
by changing the properties of its own execution (whether it should be
minimized, or terminate on finishing, etc.), and giving it a custom
icon.
A typical HTML file will look something like this:

Style sheets are used so that the control is anchored to the
very edge of the document. The rest of it is pretty much just
the ActiveX control. The ProgID is used to identify the control,
and X.App uses this to retrieve the CLSID. Starting with version
2.0, this CLSID is updated each time an application is run.
Using X.App
Using X.App to create an application is pretty
straightforward process. If you know the ProgID and the name of the ocx
file that stores the control, than you pretty much have everything
you need to make your program. X.App lets you choose names for the
form executable, as well as a startup batch file, and you can
further customize the form by supplying a name, icon, and setting
its size and location. The readme explains everything in detail,
but here is a look at the main X.App form, with a brief explanation
of each field:
Note that you can make the form invisible if your control
supplies its own form, though I believe that the Internet Explorer
dll used for the browser control only supports modal forms. This
is still useful if you want to create about boxes, dialogs, etc.
Once you have supplied all the right information, you simply hit
the "Create" button, and X.App will build the proper files for you
in the directory you specify. A dialog box will appear beforehand,
indicating what files will be created, and which system files you
should package if you intend to distribute your program. If
everything looks good, X.App will create an application for you!
Using/Distributing X.App applications
X.App applications can be launched by either running the form
executable or the batch file. Either way, a form will be loaded
that will have the look and feel that you specified, containing only
a browser control that has been sized to fit the entire form (and then
some, so that the scroll bars are not visible). You ActiveX control
should be loaded into the control almost immediately, and you will
have a full-fledged application!
The dialog box that appears beofre the app is created
will have detailed
the files that must be packaged with your program if you intend
to distribute it. There is no need to package X.App along with it;
everything should be right there in the specified directory (except
for the required system files, which
will be listed in the dialog). As mentioned above, no license or permission
is required to distribute your application independent of X.App.
Just make sure you package the correct files, with their names
unmodified, to ensure that your app will work correctly. Note that
starting with version 2.0 of X.App, the CLSID in xapp.html will
be updated each time the form is executed, so your program should be
portable to any machine.