Java example

It took me a long time to work out how to load classes dynamically so I thought
it might be nice to have a simple example.

Free Delphi bits

These items may be useful to Delphi programmers. These are 99% home grown routines
which I find useful from time to time. It is no skin off my nose if you find
them useful also.

These are mostly Delphi 2 .pas,.dfm and .dpr files so you can inspect and tweak.
Read the source before using it. My standard is to put curly
comments straight after the first line of the procedure body to explain what it does.
If there are any text files in the zip files then please read them also.

I use many of these these daily. There are some bits that just suit me fine for reasons
too boring to go into and some legacy bits I daren't consign to the bit bucket.
If you want to develop them to suit yourself
then go ahead. If you find a bug then send me the fix.

There is no charge, no support and no liability accepted.

NoBoForm prettifycation - Easy Drag and resize

This is a tiny unit which gives you the ability to drag and resize borderless controls.
It is extremely easy to use with one call in .MouseDown and one in .MouseMove.

This is a unit which allows you to put a raised border round a form to make it look
like it is laid on top of the screen. Controls can be sunk or raised. As well as
the 3-D effects you can set bitmaps to skin the form surface with. The two together
go nicely.

A really cool effect is to use the exact desktop wallpaper so that the form looks
like it is made of a clear plastic overlay.

Clear plastic effect

Realistic 3 dimensional effect

20 bitmaps included, roll your own

The zip file contains a couple of example projects and source code. One of the
examples shows how to move and resize a form which doesn't have borders.

Encapsulation of database reads that trap null fields and allow the use of
"T/F/Y/N" in single character fields as boolean. (So you can SQL on them)
I never read a dataset field any other way.
It avoids silly invalid variant conversion errors on nulls and doesn't care
about different sorts of number field.

A new date type which allows invalid dates such as Not-a-valid date, Beginning-of-time,
3rd July (ie no year) and so on. This has been designed to work very simply as
a three character string and is ideal for database work.

Various date routines including checking, enhancing an editbox and converting
into the correct format for SQL queries

This changes frequently (as I add goodies and walk slap into
bugs) so be warned that although most of the code is stable there might be
bits that are new or bits that you use in a different way to me and give
odd results.

Column and table printing package. This is what I use when I want to
print columns and tables. I can choose the heading styles, use the space
available in different ways and draw all the lines and border quite simply.

Paradox database structure dumper
(1)Dumps database structure of tables to a text file.
(2) Stores SQL queries (useful for e-mailing to clients with odd questions)
(3) Dumps SELECTed data to screen and text file
(4) Works with non SELECT SQL as well
(5) Works with my dates (q.v.)This is part of the pack that goes out to customers of mine who have SQL/
Paradox databases. Makes support much easier when you can twiddle with odd
queries or delete obnoxious data. Works via BDE aliases.

I wrote this because I found that I wanted to do things a bit more advanced
than an INI file would support. The dictionary stores variants against a
keyword, so for example D.setInteger('Height',45) stores an integer under
the key 'Height' and TF := D.GetBoolean('DoneThisBefore?') get a previously
stored boolean.

An important feature is that it can load and save itself to file efficiently.
See MiniIni

This is my own encapsulation of a simplified ini file.
My configuration files are just comments (lots) plus foo=bar type statements so
what I wanted was something very simple that I could just open then read/write
specified named variables. eg.mi := TminiIni.create('');
foo := mi.getstr('FOO');
mi.free;
The above example opens .conf but you can specify a file or a database alias.Sept '03: Includes Form position/font/colour save/loadMarch '04: Includes MRU list

Hacked code and a bit of explanation to deal with mysterious problems when printing in NT or across a network of mixed OS.
What we need is an explanation from Borland why they are SO UNHELPFUL about fixing these obvious bugs.

This is a one-stop call which creates and mainatains an aged chain of backup files.

For example to create a daily, weekly and monthly backup a single call with parameters of
[1,7,31] would do the trick. This is sometimes called the Tower of Hanoi method and is useful
when you want to have frequent copies of fresh data but only a few copies of ancient data.

I have combined an OK box, an Alert box, a yes/no dialog and an input dialog into a single
unit and added the features I use all the time.

Blurb is under the programmers control with sensible box resizing.

Optional help button

Yes/No button captions can be adapted to suit with buttons enlarged to suit

OK box is plain white while the alert box flashes yellow/white. (I reserve alerts for
out of the ordinary events which may mean a support call. OK serves for "operation completed"
and "operation failed")

Plug-in replacements for inputbox and inputquery

Inputs extended with validation for strings (including pick from a list), integer,float and date
with variations such as Positive-integer or Date-in-past.

I often want to incorporate being able to print a customer's own letterhead
into an application. In the past I did this by coding the bits I wanted
but now I've packaged it all into an object which reads a configuration
file.

In the configuration you specify the bitmaps (it doesn't scale bitmaps
but it will sort out different bitmaps for different printers) texts and
other rectangular areas (in which you'll be putting something later under program control).
By creating the letterhead object you'll select the printer and be ready to print the
complete letterhead or programatically select the elements to print. After that you've got
access to the text areas which you might use for printing addresses into window envelopes
and the dimensions of the space you've left for printing the actual content.