Delphi Source Code

This source code is for Borland Delphi (Object Pascal), it should load and compile cleanly in most versions of the IDE. It was written using the Borland IDE, and tested numerous times in production programs of both my own and others. If you use any of this and find a bug, or just want to tell me it was useful, please contact me to tell me about it.

Relevant Links

Screen Saver Example Code

The source code for the screen saver example is a clean example of writing a screen saver in Delphi. It doesn't do much, as a screen saver, but it makes a great example. Every problem you'll run into writing a screen saver is shown and solved: showing the preview window, keeping it on position, ending when the mouse moves, etc. There are a lot of examples out there of screen savers in Delphi, but I couldn't find one that was a clean screen saver without bugs.

Uniform Random Numbers

The Uniform Random Number unit contains a Delphi code unit with example program to generate and plot random numbers in a uniform distribution. If you need some random data within a particular set of parameters, and want it uniformly distributed between a minimum and maximum, here you go. It's best to use this method for generating test data, or filling databases with random stuff for debugging purposes.

Disk and File Functions

A unit of disk and file functions, somewhat dated but useful. If you need to delete, create, manipulate or otherwise edit files and folders, this is a handy unit.