1. Home
  2. Computing & Technology
  3. Delphi Programming
Previous Delphi tutorials / articles - 2007
Here are links to all of your favorite tutorials, articles, VCL top picks, tool reviews, technical tips on Delphi Programming and a lot more, sorted by date.
If you prefer, you can browse by topic.

More Features...
Various Delphi Programming tutorials, articles and technical papers sorted by date: 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998
Delphi Programming Tips 'n' Tricks

Choosing the Best Font for your Delphi / Pascal Code - December 25, 2007
If you are like me, you look at your monitor screen for at least 8-12 hour per day. What's more, 90% of that time you are ...

Date Time SQL Queries: Formating Date Time Values for Access SQL in Delphi - December 24, 2007
Ever got the awful "Parameter object is improperly defined. Inconsistent or incomplete information was provided" JET error? When you need to create a SQL query againts ...

Store a String (or an Object) Along with a String in a ListBox or ComboBox - December 18, 2007
There are situations when you want to display a list of strings to the user, for example in the list box control, but also have a...

Memory Leak Notification in Delphi - Report Memory Leak on Program Exit - December 17, 2007
One of the nicest features of the "new" memory manager allows applications to register (and unregister) expected memory leaks, and optionally report unexpected memory leaks on ...

New and Improved: Screen Thief 2 - December 11, 2007
Screen Thief can send / receive raw (binary) data (screen shot images) using TCP connections; it's a network application designed to "steal" screen shot images ...

Force TListView's Edit Mode using a Keyboard Shortcut - December 10, 2007
At run time, when ReadOnly for the TListView control is FALSE, the user can click the selected item to "enter" the edit mode. Upon entering the ...

Implementing On Item Click / Double Click for Delphi's TListView control - December 4, 2007
Unfortunatelly, if you need to know what list view item was clicked or double clicked you cannot simply handle the OnClick / OnDblClick events to get ...

Displaying Enumerated Properties in a Selectable List - Run-Time Enum Selection in Delphi - December 3, 2007
At design-time properties of enumerated types (including Boolean) appear as editable strings. You can also cycle through the possible values by double-clicking the value column, and ...

Display Custom Hints for Status Bar Panels - November 27, 2007
What does not come out of the box for the TStatusBar Delphi control, is the possibility to have each panel on a status bar display its ...

Disable CTRL V Shortcut Key for a TEdit / TMemo (TCustomEdit) - November 26, 2007
Sometimes you need to disallow a user from using keyboard shortcuts for common clipboard operations such as copy (CTRL C) or paste (CTRL V) while an edit control ...

Delphi Form Activator with Visual Thumbnail Preview - November 20, 2007
Are you familiar with the "Quick Tabs" feature of Internet Explorer 7? When you have lots of tabs (URLs) open, Quick Tabs make it easy to ...

Restore a Delphi Form from Minimized state to the Previous State - November 19, 2007
One problem with the WindowState Delphi property is that if a form is minimized and you need to restore it to the previous size and location ...

Proportionally Resize an Image - Creating Thumbnail Graphics using Delphi - November 13, 2007
Here's an idea for your next application: create a "form picker" to let users easily select and navigate through open forms by displaying thumbnails of them...

Preview HTTP Posted Data using Delphi and TWebBrowser - November 12, 2007
When you need to programmatically upload multiple files to an HTML form using the HTTP Post method - you can use the TWebBrowser Delphi control. Before actually ...

Skinning Delphi Applications - November 6, 2007
A selected collection of Delphi component sets to let you add skinning support to your Delphi applications. Applying a skin or a theme ("skinning") to the...

Programmatically Executing HTTP POST - Multiple File Upload - November 5, 2007
File uploads are most commonly carried out as HTTP POST. If you need to programmatically upload multiple files to an HTML form using the HTTP Post ...

Implementing OnActivate / OnDeactivate for MDI Child Forms - Get Previously Active - October 29, 2007
In an MDI application, more than one document or child window can be opened within a single parent window. What if you need to extract some ...

Displaying a TopMost System Modal Message Box (from an Inactive Delphi Application) - October 23, 2007
If you really want to grab the user attention and stop him from doing anything else, you need to be able to display a system-modal topmost ...

Iterating Over a Set type Variable in Delphi - Using For .. In Set (Enums, Range) Values - October 22, 2007
Delphi's set type is one of the features of the language commonly not found in other programming languages. Sets represent a collection of values of the ...

Delphi ZIP / UNZIP (Compression) Components - October 16, 2007
A selected collection of open source, free, and commercial Delphi components to help you add ZIP / UNZIP functionality to your application. Compressing ...

Focus the First Entry Control in a Container - October 15, 2007
In any decently complex form design you will probably have edit controls (edit boxes, drop down lists, radio buttons, check boxes, etc) contained within a parent ...

Implementing "Contains Focus" for Delphi's Container Controls: TPanel, TGroupBox, ... - October 8, 2007
In complex form designs where you have dozens of controls contained in several containers it is sometimes necessary to find out whether the focused control ...

Implementing QuickSort Sorting Algorithm in Delphi - October 2, 2007
One of the common problems in programming is to sort an array of values in some order (ascending or descending). While there are many "standard" sorting algorithms...

Get Directory Creation, Modified, Last Accessed and Last Write Date and Time - October 1, 2007
While Delphi provides many (file and) directory related functions and procedures to help you operate on folders and file, quite a few tasks equire you to...

Directory Helper Routines - Directory Related Delphi Functions and Procedures - September 25, 2007
When developing applications that need to operate on files and directories it is a common task to, for example, get the list of all sub-directories...

Get Parent Folder / Directory - September 24, 2007
Delphi's RTL library exposes dozens of file name related functions and procedures. You might be surprised that one function is "missing": how to get the parent...

Store User and Application Data in the Correct Location - September 18, 2007
When in the need of storing some content related to your Delphi application on the user's hard disk, you should take care of the support for ...

Get Windows Running Time - September 17, 2007
If you need to display how many days (minutes, seconds) have passed since Windows have been started, you need to convert miliseconds (returned by the GetTickCount ...

Is the Current Windows user a Computer Administrator (programmatically check from Delphi)? - September 10, 2007
In Windows there are two main types of user acount types: "Computer Administrator" and "Limited". If you need to check, from your Delphi application, if the ...

Highlighting Delphi's DBGrid Row On Mouse Hover - September 4, 2007
What most Delphi developers are not aware of, is that you can even implement the OnMouseHover behavior to change the display (color, font, etc.) of...

Array as a Function Return Type and Method Parameter - September 3, 2007
When you declare functions that will return array value, you cannot include index type specifiers return declaration. If you try so, you'll receive :" [Pascal Error...

Minimize Child Forms Independent of the Main Form - August 28, 2007
By design, Delphi applications only have one button on the Windows Task Bar for the whole application. When you, for example, minimize the main form...

Drop Multiple Instances of a Component on a Delphi Form - August 27, 2007
When designing your application interface, you generally add several components from the Component/Tool Palette on a form and set their properties. In complex designs, where you need to ...

TAdoConnectionEx - Custom Delphi Component With Source - August 21, 2007
Enhanced ADO connection component that prevents design-time database connections from being used at run-time unless explcitily allowed via the AllowStreamConnected property. Full Delphi source code included.

How to Select a Control Parent in the Delphi Form Designer - August 20, 2007
When designing forms (frames) for your Delphi application, you often use container type controls such as a TPanel or TGroupBox to hold other controls. In complex ...

Minesweeper Game - Delphi Version with Source Code - August 14, 2007
Minesweeper is a single-player computer game. The object of the game is to clear a minefield without detonating a mine. The most well-known version comes bundled ...

Remove MDI Child Form's Title Bar - August 13, 2007
If you need to hide the title bar of a Multiple Document Interface child form, you might be tempted to set the BorderStyle to bsNone ...

An Error at Run-Time due to the Database Connection Left Open at Design-Time -
No matter how much I (guess this refers to all of you) try not to leave the Connected property to true before building for the ...

Adding Custom Properties to Delphi Forms; Overriding the Create Constructor - August 6, 2007
If you need to add a custom property to a form and have it initialized *before* the OnCreate event, you will need to override the form's ...

Display Custom TTreeView Item Hints - July 31, 2007
The TTreeView Delphi control wraps the Windows tree view control. TTreeView is comonly used when a hierarhical structure needs to be displayed to the user. To display...

Disable Automatic Hint Feature for the TTreeView - July 30, 2007
By Windows design, when you hover your mouse over an item, a hint (tooltip) window appears containing the title of the item under the mouse cursor...

An Easy Way to Programmatically Generate Strong Passwords -
One method of generating a long password, without storing it anywhere is to select a file (either binary or text), do a little bit o...

How to Debug Delphi VCL Source Code (Set a Breakpoint in the VCL) - July 23, 2007
One way to locating errors while designing your code is to use the integrated debuger. If you set a breakpoint on a line in your ...

ASuite - A simple application launcher for you - July 17, 2007
ASuite is an application launcher to manage an unlimited number of files, folders and webpage for quick access. It is designed to work with...

Parsing Command Line Parameters with Delphi - July 16, 2007
Delphi's ParamStr and ParamCount functions are designed to help operate the parameters (command-line arguments) passed to the application. Due to the way ParamStr function is...

Disabling Container Child Controls when the Enabled property changes - July 10, 2007
When an edit box or a label is placed on a panel, in a Delphi application, if the Enabled property for the panel is set ...

How to Display the & (Ampersand) Character on Labels and Buttons - July 9, 2007
By Windows design, accelerator keys enable the user to access a menu command from the keyboard by pressing Alt along the appropriate letter, indicated in your...

Implement a Button with a Drop Down Menu in Delphi - July 3, 2007
A "Button with a Drop Down Context Menu" appears as a normal button with an additional down arrow on the right side of the button...

Delphi's NIL value and the Assigned RTL Function - July 2, 2007
In Delphi, the NIL constant (also a reserved word) is a pointer value defined as "not-assigned" or "pointer to nothing" or "undetermined". Understand NIL before you...

Convert a Virtual Key Code to a Character - June 26, 2007
Windows defines special constants for each key the user can press. The virtual-key codes identify various virtual keys. These constants can then be used to refer ...

How to Convert an amount of Milliseconds to a TDateTime Value - June 25, 2007
When doing lengthy operations in your Delphi applications, you might want to display the time passed to the user. If GetTickCount is used to measure the...

Capturing a Screen Shot of a TWebBrowser Content (Web Page) in Delphi - June 19, 2007
You might need to programmatically grab the screen shot of the current page loaded in the web browser control. A custom Delphi function WebBrowserScreenShot will capture ...

Set the Checked property of a TCheckBox Delphi control Without raising the OnClick Event -
TCheckBox Delphi control displays a check box that can be on (checked) or off (unchecked). The Checked property specifies whether the check box is...

SharpE - Open Source Delphi Windows Shell Replacement - June 12, 2007
SharpDesk's powerful shell replacement makes crafting a luxurious desktop a delight. Every pixel of visible space can be personalized, and the export feature makes it ...

Programmatically Convert RGB Color to CMYK -
The CMYK (Cyan, Magenta, Yellow, Black - Key Plate) model, refers to the 4 ink colors used by the printing press. C is cyan (blue-green), M...

Understanding Delphi SET Types -
One of the Delphi language features not found in other modern languages is the notion of sets. Delphi's set type is a collection of values of ...

An Invalid Hard-Cast is NIL in Delphi for .NET -
In Delphi you can (type) cast an object to a different class using either a hard-cast: TObject(Sender).Name or an as-cast (soft-cast): (Sender as Object).Name. Since .NET...

Multithreaded Delphi Database Queries with dbGo (ADO) - May 29, 2007
To speed up data processing, for example, fetching data from the database to create reports, you can add an additional thread to fetch and operate on...

TObject(Sender) vs. (Sender as TObject) - Differences Between a Hard Cast and an AS Cast in Delphi - May 28, 2007
In Delphi the AS keyword is used for casting an object (or interface) of one type to another. When several controls share an event handling ...

Cobian Backup (Free/Open Source Delphi Application) - May 22, 2007
Cobian Backup is a multi-threaded program that can be used to schedule and backup your files and directories from their original location to other directories/drives...

Delete Multiple Selected Items in a TListBox Delphi Control - May 21, 2007
The TListBox Delphi control displays collection of strings in a scrollable list. By setting the MultiSelect property to true, the user can select more than one...

Fade In / Out an About Box or any Modal Delphi Form - May 15, 2007
To create a nice effect for the user, you might want to decide the modal form to fade in - appear gradually from a completely transparent...

Implement the On Item Checked Event for TListView - May 14, 2007
The TListView Delphi control displays a list of items in a fashion similar to how Windows Explorer displays files and folders. Unfortunately, the TListView does...

A First Look at Delphi 2007 for Win32 - May 8, 2007
Delphi 2007 for Win32 from CodeGear revitalizes Win32 development by combining Delphi's proven visual Rapid Application Development (RAD) approach for accelerated Win32 development with support ...

How to Parse TAB Delimited Files in Delphi - May 7, 2007
TAB delimited text (ASCII) files contain lines of code with each chunk (column) of data (string) separated by the TAB character. Most database and spreadsheet programs...

Convert RGB to TColor or How to Get More TColor values for Delphi - 04/30/2007
TColor type is used to specify the color of an object. It is used by the Color property of many components and by a number of other properties that specify color values.

Implementing MultiCast Events for Win32 Delphi's TDataset and TField descendants - 04/24/2007
The "TMultiDsEvent" class enables you to add multicast event handlers feature TDataSet and TField descendants.

IsDirectoryEmpty - Delphi function to Determine if a Directory is Empty (no files, no sub-folders) - 04/23/2007
Delphi does not provide any "ready made" RTL function to test if a given directory (folder) is empty, i.e. contains no files or sub-folders.

Factory Patterns - Delphi OOP Part 13 - Chapter 26 - 04/17/2007
This chapter explores the Factory patterns, which, instead of changing an object's behaviour, provide ways of creating different objects to suit run time requirements.

How to Override Delphi Form's Restore Operation? - 04/16/2007
The WM_SYSCOMAND can be used to trap the restore window operation. When the form is maximized the "Maximize" button changes its look and operation. Clicking the restore button restores the window to its previous (normal, before it was maximized) position and size. By overriding (changing) the default "restore" action, you can for example, create a Delphi form that can be only mimimized or maximized.

How to Declare a Constant Record in Delphi - 04/09/2007
Record data types in Delphi represent a mixed set of elements. Each element is called a field; the declaration of a record type specifies a name and type for each field.

Implementing "Cancel All Edits" for a Configuration-type Form in Delphi - 04/03/2007
Configuration forms often have a cancel button used to revert any edits to the edit controls back to original (initial) values. Here's how to implement such a mechanism in Delphi applications.

How to Store a String value to a Tag Property of a Delphi control - 04/02/2007
Every Delphi component exposes the Tag property which can be used to store an integer value as part of a component. You might want to store a string value in the tag property of a control (TEdit, TButton, etc.) to let every control cary an additional string value.

Displaying XML (RSS Feed) Data in a TreeView Delphi control - 03/26/2007
RSS feeds are XML formatted documents used to present digital content. RSS typically list items, such as articles or blogs posts. Here's how to create a simple RSS feed reader by transforming the XML into a tree view.

How to Hide the Tabs of the TPageControl Delphi control - 03/26/2007
If you need to create a wizard-like user interface where you have "Next" and "Previous" buttons "moving" a user forward and backward through a set of pages (dialogs), you might want to hide the tabs of the PageControl and thus disallow selecting a particular page by the mouse.

Rearrange Multiple TListView Items using Drag and Drop - 03/20/2007
Using Delphi's drag and drop operations it is easy to implement rearranging multiple items in a TListView control.

Programmatically Detect the MyDocuments Folder for the Current Windows User - 03/19/2007
If your Delphi program creates application specific documents you want to be stored in the "MyDocuments" folder for the currently logged Windows user, you need to programmatically determine the path to the "MyDocuments" folder.

Save (/Load) all the Images from a TImageList to a Single File - 03/12/2007
If you want to reuse images from a the TImageList control, you can populate the TImageList with images, store all the images in a single resource-like file, then reuse at run time, by dynamically restoring the TImageList control from the saved file.

Incremental Search for the TListBox Delphi Control - 03/06/2007
Imagine a list box with a huge number of (unsorted) items. Finding the one user wants to select might turn into a nightmare. Let's provide the user with an option to immediately locate the item in the list box by adding incremental search functionality.

Delphi Popup Menu With Different Item Heights (and Custom Graphics) - 03/05/2007
If you need to have different heights for some of the menu items, in Delphi applications, you must turn to owner drawing. Here's how to draw a custom sized image for a popup menu item.

Display a Password Dialog when Restoring a Delphi Application from the TaskBar - 02/27/2007
Suppose you have a data-critical type of application where you would not want a non-authored user to work with the data. What if you need to display a password dialog *before* the application is restored to make sure an authorized user is accessing it? Here's how to do it in Delphi.

How to Hide / Show the Main Menu of a Delphi Application - 02/26/2007
The TMainMenu Delphi component does not expose the Visible property to let you show or hide the menu for a form programmatically, does it? It does not, but there is a way to hide the main menu for a Delphi form at run time. Here's how...

Display a LogIn Dialog Before the Main Form of a Delphi Application is Created - 02/20/2007
If you need to implement some kind of authorization for your Delphi application you might want to display a login / password dialog *before* the main form is created and displayed to the user.

How to Implement the OnCreate event for a Delphi TFrame object - 02/19/2007
A frame, like a form, is a container for other components. Frames can be nested within forms or other frames, and they can be saved on the Component palette for easy reuse.

Apply Custom Transparent Color for the TImage Delphi Control - 02/12/2007
If you do not want the color of the bottom-left pixel to specify which image color should be "transparent" - you can set the TransparentColor property programmatically.

Bidirectional links, Callbacks and Linking Classes : Delphi OOP Chapter 25 - 02/06/2007
Nearly all the communication between objects covered so far has been unidirectional, from an initiator to a recipient. This leaves the recipient with no possibility of using its own initiative to solicit any information it may need from the initiator, a problem we address in this chapter.

Display Custom Hints for TListView Sub Items - 02/05/2007
In most situations, when using the list view, you will need custom hints to be displayed for every list view item. What's more, a custom hint for every list view sub item might be required.

Pre and Post-Build Automation in Delphi - 01/30/2007
This article describes a simple way to extend the BDS IDE so that Pre-Build and Post-Build tasks can be automated without a single line of code.

Create Collapsible Code Blocks in Delphi Code Editor using the {$REGION} directive - 01/29/2007
In Delphi 2006 (both Win32 and .Net) you can apply a special {$REGION 'Region Name'} directive to mark a "named" collapsible regions in the code editor. To mark code as a region, surround it with the REGION and ENDREGION directives. You may include a caption that will be displayed when the code is folded and hidden.

Drawing on a TStatusBar's Panel Delphi control: Styling a Panel with Background Color, Font Color, Graphics - 01/23/2007
To have a more eye-caching user friendly interface you might want to decide to add graphics, change the color and the font style of a StatusBar Panel. Delphi's owner drawing technique let's you do that. Learn how...

Use an Icon for a Glyph on a TBitBtn Delphi control with the help of TImageList - 01/22/2007
The TBitBtn Delphi control is a button control that can include a bitmap on its face. The Glyph property specifies the bitmap that appears on the bitmap button. By design, the Glyph property can only display BMP (Windows Bitmap) images.

Implementing the OnClick event for a Panel on a TStatusBar Delphi control - 01/16/2007
Delphi's TStatusBar control displays a row of panels, usually aligned at the bottom of a form. The Panels property of the TStatusBar control is a collection of TStatusPanel objects. The TStatusBar exposes the OnClick event that gets fired when the user clicks the control.

Understanding ScreenToClient and ClientToScreen Delphi methods - 01/15/2007
Every Delphi control, descendant of the TControl class, exposes two methods you can use to convert point coordinates: ScreenToClient and ClientToScreen.

What to do in 2007, if you are a Delphi developer! - 01/09/2007
A CodeGear Delphi Developer's New Year's Resolutions for 2007. To help you prepare for the whole new year, here are some ideas to help you decide on the Delphi programming related topics you might want to learn / explore about.

Displaying the Percentage Character in Delphi's Format function - 01/08/2007
Delphi's Format (declared in the SysUtils unit) function can be used to construct a formatted string assembled from a format string and an array of arguments. Here's how to make it display a "stand-alone" percentage character.

Programming Atlas - Book Review - 01/01/2007
Programming Atlas, a great book about great technology. If you try to look for resources about MS Atlas you'll find a great deal of them but nothing is straight forward and easy for learning.

More Features...
Various Delphi Programming tutorials, articles and technical papers sorted by date: 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998
Delphi Programming Tips 'n' Tricks

Explore Delphi Programming

More from About.com

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2008 About.com, a part of The New York Times Company.

All rights reserved.