Components for Delphi 5

I've published some units and components for use in Delphi, tested on Delphi 5.

Source code updated 2010/10...


Non-visual units


ComUtil is a unit of various classes and usefull functions.
Original version was CommonUtil and they co-existed for some time during my development. It started in times, when COM technology was not known to me and it is not related to COM+...

Utility classes, included here:
  • TDualStringList - similar to a string-list, but instead of Objects it has got another string value per item...
  • TSubStrings - small "window" into a large string-list (for example to pass attachment text to a function without a need for extracting into a separate list)
  • TSharedStringStg - a list, which caches strings to re-use a same pointer (and memory) for a same text...
  • TNamedInterfaceList - a string-list, which stores interfaces in Objects[]
  • TDualList - a list of 2 pointers per item.
  • TArrayInfo is a record for sorting any array (including lists)...
  • TSubStream - a small window into a larger stream - spares copying into memory-stream...
  • TTempFileStream - a file-stream, which creates and deletes a temp-file
  • TReplaceStream - for safe replacement of files (creates a new file (~ext) and needs later commit to rename it...)
  • TStreamLineReader - is a fast cache for reading lines from a stream
  • ICompUnknown - extension of IUnknown, which defines procedure AddReference to "unplug" itself, when the object is destroyed. Used throughout my programs for interfaces to TComponents (including TForms), which may be destroyed by their owner, while still referenced by an interface...
  • ICompIntfList - program-wide list of interfaces with delayed creation of objects (on demand)
  • Functions like ListAdd, ListRemove, FreeListAndItems to manage TLists...
  • Functions like IsObject, IsValidObject, Is_Class and FreeAndNil for safe object testing...

Source in is published free, size 40k zipped...
(28.9k compiled code total, 160k source, 5790 lines)



TextUtil unit brings some text-related functions and objects, partially written in 32-bit asm.
(Assembler code is used for "atomic" functions like "find next occurence of char in PChar" etc...)

Source in is published free.
(zip 32k, 128k source, 22k compiled, 4.8k lines, 192 functions - which is an old statistic)


Various drawing related functions, enough for drawing buttons, client-edge rectangles, check-boxes etc...

Also includes Rect functions, otherwise declared in user32.dll, but written in pascal/asm for fast operations...

Includes transparent painting, floating coordinate functions, TScreenCanvas object, GetNearColor for lo-color screen and GetMiddleColor for mixing colors on high-color screen.

Source in is published free.
Requires ComUtil, published above...
(12k zip, 48k source, 9.9k compiled, 79 functions) Is included in AltGui.bpl.


Unit with Debug and LogException functions, which write to file debug.log, only if it is present...
Source in is published free.
(5k zip, 18k source, 3.8k compiled)


A TIdGenerator object for use with file-based databases.
Uses a binary file with multiple generators.
Rather old code, not much profi...

Source in is published free.


A TMruManager class, which manages list of entered texts and re-orders duplicates to list start.
Storage to a generic TCustomIniFile (which includes registry access with TRegistryIniFile)
Source in is published free.
Requires ComUtil and TextUtil, published above...
(3.9k compiled code)


Unit of functions for parsing commands (breaking tokens, replacing and parsing arguments etc...)
Includes interface definition for registering and dispatching commands into DLL modules, with objects implementing these interfaces, which you need not use in your exe. Includes usefull routines for command-line programs...

Source in is published free.
Requires ComUtil (published above), includes UDebug.pas...


A generic incremental-search control for list-boxes, tree-views and anything else (ie. - you must search in event code, generic is only the user interface)

Description in Czech langauge is available...
(K tomuhle jsem napsal článek Komponenta pro inkrementální vyhledávání, původně pro PC-svět...).
Source in is published free.


Delphi Native MDI - a MDI implementation, written completelly in Delphi.
  • Allows separate window maximalization, creating hidden MDI windows etc.
  • New version corrected, so that it does not need Forms.pas modification...

Source in is published free, requires ComUtil (above)...


Structured and virtualized memory allocator.
Version 3 is slowly getting obsolette, but a versatile version 4 is still far from finished state...

Source in is published free.
(Obsolette version which may include some bugs!)


Simple memory manager stub to help checking for memory-leaks...
Before each item at offset -8 is requestor code address.
Call once AllocMem with bnMarkThisAllocMem:=True to mark address of AllocMem function (and not record it as a requestor, but caller of AllocMem instead)...
Source in is published.


Extension of TImageList, which supports Names[] of images, and IndexOf() to find the index...
This allows you to have complex image-list in application, where indexes change often, or to merge two image lists. If you look-up images by name, the list design is much more free... Also the design-time list editor is much better, than what is for TImageList in Delphi 5...

Supports compressed resources to spare exe-size.
For this compressed res-file, the editor is available also...

Image-lists, defined as global, may be used in design just by a global-name, without need of the main-form loaded... This is available only for external lists in compressed-resource, which must be linked by {$R ...} switch in main-form...

Source in is available free.
(62k zip, 85k source, 11k compiled)


Simple non-object functions to access registry...
Now includes some high-level functions like finding or exporting registry, copying registry keys and getting/setting key security descriptors...

Source in is available free.
(12k zip, 60k source, ?k compiled)
Dependence on ComUtil may be removed by commenting-out one line...


A memory table, far better than the one in RX 2.75 (A newer version of RX may include a better table - I don`t care any more...).

  • Built-in CSV import/export
  • Allows more clones (datasets) attaching to a same record list...
    This is specially useful if you need to parse table contents, while the table is displayed in Grid and should not move the current row...
  • Sorting
  • Notify registration
  • Includes another similar class for a single-record mem-table...
Source in is available free.


  • Tokenizer - fast tokenizer of pascal or other code, reserved words, number/string parsing etc...
  • Evaluator - expression evaluator with operator precedence and possibility of function registration
  • Function Eval(Expression: string): Variant; for single-shot expression evaluation.
Source in is available free.


  • Various binary trees with hash-level for fast data lookup (string,int,custom)
  • On-demand rebalancing
  • Configurable comparation/hashing
  • Enumeration
  • Merging

  • Includes newer and simpler version,, built just from few functions (but with no hash-level).
Source in is available free.
There are 2 independent versions included, the PAS file does not need the INC file...


  • plug-and-play replacement for TFormStorage in RX
    (just put placemnt.pas in search-path before original, design still the RX version, no other change to sources?)...
  • Better state restoring, fewer values stored for same stuff, less code, better support for custom-ini-file classes
  • 90% compatible with RX version (2.75)...
Source in is available free.


  • DataTree for structured data storage
  • XML import and export
  • Fast and efficient (much less memory requirements than XML parsers built in Delphi 7)
Source in is available free.
Short readme in Czech language only...

Other components for XML reading:
  • XmlStm.pas - simple pass-through XML loading, fast, no memory requirements (does not store loaded data)
  • - extremelly lightweight code for XML loading, compiles at 3390 b code only, no unit dependencies beside Windows, no objects, no string allocation... Total file size is not limited, but single element may not contain more than cca 60kb data.


  • Utility for text-encoding conversions
  • Some encodings are hard-coded, others may be converted by System via unicode
  • Supports MIME charsets by name
Source in is available free.


  • Minimalistic set of OpenSsl for PKCS#7 signing and encrypting
  • Certificate information
Source in is available free.
Eric Young should be mentioned as follows:
This product includes cryptographic software written by Eric Young (


  • Some units rewritten into pascal from LibEay32 sources (except Base64, SHA and Asn1, which were written from scratch by me...)
  • Contains: AES, Base64, BlowFish, Cast, RC, DH, DSA, RSA, MD2, MD5, SHA
  • Unit SecureSha (with Sha1InitSecure) prevents having plain-text of hashed data in memory buffers
Source in is available free.
Eric Young should be mentioned as follows:
This product includes cryptographic software written by Eric Young (


  • Pascal code for fast JPEG reading
  • Original source by Jacques H. C. NOMSSI NZALI, L. Bajo Eloy, A. Hoerstemeier, with my additions
  • Supports direct row-by-row loading of JPEGs
Source in is available free.

  • Fast code for LIST_ENTRY handling (double-linked lists, used very often in kernel and system code)
  • Functions include InsertHeadList,InsertTailList,RemoveEntryList with Interlocked variants (InterlockedInsertHeadList,InterlockedRemoveEntryList etc...)
  • Function ValidNextEntry which verifies back-link and uses IsBadReadPtr to prevent exceptions
  • INC code to include in any unit, no dependencies
  • PAS stub to use as a standalone unit
Source in is available free.


  • Simple web-server, intended for control of services via HTTP protocol
  • Uses Synapse library with some additions
  • DLL with source
  • Supports HTTP and HTTPS protocols
  • All to do to write a http server is starting the server and handling OnRequest event
Source in is available free.

Visual components

I think of publishing the following controls, which replace various system-defined controls with an implementation, written completelly in pascal:
  • TVTreeView - a tree-view replacement, far faster and powerful than ComCtrls version...
  • TVPager - a page-control replacement
  • TVHeader - a header control
  • TVStatus - a status-bar replacement, defined as TControl to spare a HWND handle...
  • VCtrls - a single-line edit controls written in pascal, which do NOT use system edit classes, and still are compatible with TEdit...
    Includes a TVComboBox, which is class of TCustomEdit to simplify code generalization.
    Includes possibility of custom frame drawing, button in any edit, default-font for all edit controls in program etc...
    It's disadvantage is, that is replaces EDIT completelly, even in other standard or third-party edits through-out the process.
    I've tried to be 99% compatible with description in Win32.hlp, anyhow it may make undesired effects in other specialities...
  • TextView - a fixed-text display components, including TMemTextView, THexTextView, and TTextEditor, which I use to write most of code and html pages, in my plain-text editor LiteEdit, published free without source yet...
    Supports highlighting, bookmarks (either user-bmks, or for parser use), searching text etc...
  • TVCheckBox and the suite - check-boxes non-distinguishable visually from standard ones, unless you use colors, auto-sizing and more...
  • TNiSpeedBtn and TNiBtn to use with TNamedImageList to design image-names instead of numbers...
  • VSpin - spin-button and spin-edit for VCtrls
  • VToolEdit - replacement for ToolEdit in RX, for VCtrls...
The source code is interlaced a lot between various parts and separating it for publishing may take some time...


  • List-view, written completelly in pascal - no system control beneath...
  • Supports column-mode only, another control supports horz-mode (TListBox compatibility replacement)
  • Columns and Items may be Selected into the list-view, which allows you to have 1 visual component and switch contents in PageChange (like in TaskView - most forms in TaskView have got only 1 TVListView component and switching pages just replaces Items and Columns collections...)
  • Cell coloring,
  • Any number (well, only 64k-2) of values (text+object+attribute) per item.
    The values need not be contiguous, they are matched against Column.ValueIndex to get cell contents...
  • Completelly virtualized drawing
  • Minor support for a fixed columns
  • Download GenIncSearch also to implement fine searching...
Source in is available free.
(96.1k zip, 204k source, 7.5k lines, 43.2k compiled)


  • Smart Graphic-control (non-focusable) for volume control etc.
  • Mouse-wheel must be forwarded from form (win-control parent)
Source in is available free.
Preview in AltMix.exe, which also requires to start...

BPL runtime for Delphi 5

The full source for these packages is not available yet...
DCP & BPL are included here to allow you to re-compile source of various my programs...
...still only prepared...