1. Computing

Delphi Programming - Inside and Out

Delphi language, IDE tips, techniques and articles. Every programming aspect of Delphi is uncovered: OOP, Threading, File IO, RTL, VCL ...
  1. OOP in Delphi (46)
  2. Threading in Delphi (17)
  3. Delphi Tips and Tricks (346)
  4. Delphi Interoperability (7)
  5. Forms, Dialogs, MDI, SDI (22)
  6. Kylix (Delphi on Linux) (16)
  7. Mathematics with Delphi (7)
  8. Coding standards (12)
  9. File I / O with Delphi (10)

2012. Delphi Programming by Zarko Gajic
The collection to all of your favorite tutorials, articles, VCL top picks, tool reviews, technical tips on Delphi Programming and a lot more, sorted by date. Year 2012.

Delphi Record Helpers For Sets (And Other Simple Types)
The Understanding Delphi Class (and Record) Helpers introduces a feature of the Delphi language allowing you to extend the definition of a class or a record type by adding functions and procedures (methods) to existing classes and records without inheritance. In XE3 Delphi version, record helpers became more powerful by allowing to extend simple...

Debug vs. Release In Delphi Build Configurations

Two Applications In One Delphi Program (Using Conditional Compilation) - Part 2
The option to have different build configurations for your Delphi program allows you to have two (or more) different applications (executable files) being produced by the compiler/linker. For this purpose you would use a feature called conditional compilation.

Have Two Applications In One Delphi Program (Conditional Compilation) - Part 1
Creating a new Delphi (VCL, FMX) application would result in creating a single application (program) where all the units and forms used in the program would be compiled/linked into a singe executable file. If you would like to have the same code base in one program but also have an option to build two (or more) different applications - you...

On Handling Exceptions in Delphi Exception Handling
No code is error free! Some code is full of errors on purpose! What are exceptions and how they are handled by Delphi and how you can handle exceptions to help yourself and your users use a more robust and user friendly application. All inside!

On Reraising Exceptions in Delphi Exception Handling
In the On Handling Exceptions in Delphi Exception Handling article, a discussion on how to handle and what happens when you handle exceptions in your Delphi code is provided. This time, we'll see how you can explore exceptions being raised and handled and how to properly re-raise exceptions.

Remove Empty Line Added With TStringList.SaveToFile
The SaveToFile method of the TStringList class adds an empty line to the file. Here's how to remove that extra line feed in in your Delphi applications you need one line of text to really be one line of text in the saved document.

2011. Delphi Programming by Zarko Gajic
The collection to all of your favorite tutorials, articles, VCL top picks, tool reviews, technical tips on Delphi Programming and a lot more, sorted by date. Year 2011.

Accurate Difference Between Two TDateTime Values
The shortest path to creating a function that obtains precisely (1 millisecond) the difference between two dates passed as parameter. The result is a record in years, weeks, days, hours, minutes, seconds and milliseconds which is the difference of full dates!

Be Aware Of Uninitialized Variables
Take a look at your Delphi application, the one you are developing for many days (weeks, years) ... when you hit Compile - how many compiler warnings do you see? Zero? Bravo! A few? A dozen, hundreds? Do you find in the list the "Variable 'btn' might not have been initialized" warning? Are you ignoring it? You should not!

Understanding Unicode Support in Delphi
If you are preparing to move / migrate your "old" Delphi applications to any Delphi version later than Delphi 2007, you must have heard that a default Delphi string type is now (where "now" means in Delphi versions >= 2009) Unicode. Go Unicode Without Fear.

Start a New Delphi Project
Delphi programming is the mutts nuts. You can start off not knowing anything about programming, within 1 hour you can write a program and at the end, still know nothing about programming :-) If you want to be a (professional) software developer and your programming environment is Delphi - you'll need a few extra tools to help you get from the "I have an idea" to the full blown Delphi buil…

The Dark Side of Application.ProcessMessages in Delphi Applications
When programming an event handler in Delphi (like the OnClick event of a TButton), there comes the time when your application needs to be busy for a while, e.g. the code needs to write a big file or compress some data. If you do that you'll notice that your application seems to be locked. Your form cannot be moved anymore and the buttons are showing no sign of life. It seems to be crashed. Application.ProcessMessages might come as a rescue, but you need to know its dark side!

2009. Delphi Programming by Zarko Gajic
The 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. Year 2009.

2008. Delphi Programming by Zarko Gajic
The 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. Year 2008.

1998. Delphi Programming by Zarko Gajic
The 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. Year 1998.

1999. Delphi Programming by Zarko Gajic
The 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. Year 1999.

2000. Delphi Programming by Zarko Gajic
The 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. Year 2000.

2001. Delphi Programming by Zarko Gajic
The 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. Year 2001.

2002. Delphi Programming by Zarko Gajic
The 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. Year 2002.

2003. Delphi Programming by Zarko Gajic
The 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. Year 2003.

2004. Delphi Programming by Zarko Gajic
The 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. Year 2004.

Delphi Programming by Zarko Gajic
The 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. Year 2005.

Delphi Programming by Zarko Gajic
The 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. Year 2006.

Delphi Programming Tutorials, Articles, Tips and Tricks by Zarko Gajic
The 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. Year 2007.

MD5 Hashing in Delphi
The MD5 Message-Digest algorithm is a cryptographic hash function. MD5 is commonly used to check the integrity of files. An MD5 hash value is a 32 digit hexadecimal number. Using Delphi, you can easily create a function to calculate the MD5 hash for a given file.

The Many Faces of Delphi Routines: Functions and Procedures
With the inclusion of anonymous methods in Delphi 2009, Delphi language has a new weapon in its "what a routine can do and be used for, and how" arsenal. Here's an overview of how and when and for what you can use various "types" of Delphi routines: functions and procedures, function and procedure pointers, methods and method pointers, anounymous methods...

Manipulate INI files from Delphi
The .INI files have a text-based file format for representing application configuration data in a format which is easily editable by humans and readable by a simple automatic parser. Learn how to use Delphi's TIniFile to read and write INI configuration files.

All the building Blocks of a Delphi Project
Delphi programming is the mutts nuts. You can start off not knowing anything about programming, within 1 hour you can write a program and at the end, still know nothing about programming :-) If you want to be a (professional) software developer and your programming environment is Delphi - you'll need a few extra tools to help you get from the "I have an idea" to the full blown Delphi build application.

How to Randomize / Shuffle Collections and Lists
The second law of thermodynamics, in short version and when read by a programmer, states that "any collection of objects tends not to be sorted". Have you ever asked yourself: why there is no "UnQuickSort" method? Here's how to randomize elements of a list or collection in Delphi.

Implementing QuickSort Sorting Algorithm in Delphi
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, QuickSort is one of the fastest. Quicksort sorts by employing a divide and conquer strategy to divide a list into two sub-lists. Here's a Delphi implementation.

Delphi Directory Helper Routines
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 for a given directory, check if a directory is empty or delete a directory. Here's a list of directory-related Delphi routines with source code examples.

An Easy Way to 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 of processing on it then force the resulting values into the ASCII range 32-127 and output them as characters. Here's how to do it in Delphi.

Delphi Compiler Version Directives
Preparing to code with no barriers. See how to overcome the compiler version problem: compiling Delphi code for various Delphi versions.

Owner vs. Parent in Delphi Applications
The differences between a Delphi component Owner and its Parent - briefly explained. Plus: when to use the Controls and Component properties of a Delphi component.

Inside the (Delphi) EXE
Storing more that just code in the application executable file. Working with resources from Delphi. How to embed a WAV, AVI and an MP3 file in a Delphi executable.

Understanding and Using Pointers in Delphi
An introduction to pointer data type in Delphi. What are pointers, why, when and how to use them.

BPL vs. DLL
An overview of creating and using 'Borland Package Libraries' and how they compare with 'Dynamic Link Libraries' in creating smaller Delphi applications.

Delphi's RTL Unleashed (Built In Delphi's Functions and Procedures)
Help yourself, increase your productivity and simplify coding using functions and procedures built into Delphi.

Understanding and Processing Keyboard evens in Delphi
Get familiar with the OnKeyDown, OnKeyUp, and onKeyPress Delphi event procedures to respond to various key actions or handle and process ASCII characters along with other special purpose keys.

Understanding Method Overloading and Default Parameters
Extending Delphi functions and procedures with default (optional) parameters and method overloading.

Understanding the Sender parameter in Delphi Event Handlers
In a Delphi event handler, the Sender parameter indicates which component received the event and therefore called the handler. Find out how to exploit the powers of the Sender parameter: share event handlers and more.

How to Auto Complete Date Value Input
Components like TDateTimePicker and similar that are designed specifically for entering dates or times are useful when we want some visual representation of a date. However, why bother with visual components that are 'not-so-input-friendly when everything we want is just one Edit box to type the date into. In this article you will find one great function designed to make date processing a bit faster.

Understanding Recursive Functions
Recursion is a general method of solving problems by reducing them to simpler problems of a similar type. A recursive subroutine constantly calls itself, each time in a simpler situation, until it gets to the trivial case, at which point it stops. Learn how to write recursive functions in Delphi.

How to Convert Numbers (Currency) to Words using Delphi
A sample code to convert (depending on the real type used) positive and negative real values up to 1.00E18 to the English words. The return value can represent either currency or numerals. For example 1234.567 will be returned as either "one thousand, two hundred and thirty four dollars and fifty six cents". Full Delphi source code included.

How to Create a Stub Program to support Self-Extracting Archives using Delphi
To create a self-extractor, you need a special little .exe called a *stub*. This stub gets pulled into the final .exe (self-extracting) file and does the extraction work for you. Learn how to build one using Delphi.

Handling Errors and Exceptions in Delphi Applications
Unfortunately, building applications includes coding. Regardless of how carefully you write/debug your program, it will be impossible to imagine every situation that can go wrong. Learn how to handle errors and exceptions in Delphi applications.

Understanding Delphi Class Methods
Understanding and using Borland Delphi Class procedures / functions. What they are and how to find a practical use for them.

Delphi RTL / FCL Reference (with code samples)
About Delphi Programming site (http://delphi.about.com) proudly presents: Delphi language reference (with code samples).

Dynamic Link Libraries (DLL) and Delphi
Everything you ever wanted to know about DLLs and Delphi but didn't know where to look for answers (or were to afraid to ask)

Before you start optimizing Delphi code
How to make sure that the Murphy's law: "Any program will expand to fill available memory" does not apply to your Delphi applications.

Speed and Size: Top 10 Tricks
Useful tips to make your Delphi programs run faster.

Experts and Wizards in Delphi
Use some magic to extend and enhance the way you work with the Delphi IDE

Protect your Delphi Software
This article is intended for those Delphi developers who want to know more about issues on protection from any unauthorized usage.

Delphi language tips and tricks
Gems: How to execute a method (procedure/function) by name, Incompatible type: 'method pointer and regular procedure' - explained, Simulating keystrokes from code, and many more...

Base Conversions, and more
Routines for converting Int to Bin, Int to Hex, Int to Roman and vice versa.

Compiler version directives
Preparing to code with no barriers. See how to overcome the compiler version problem: compiling Delphi code with various Delphi versions.

Controlling the number of application instances
How to "run-once enable" a Delphi application that can check for its previous (running) instance. Along the process, several techniques of implementing such a check will be discussed; as well as how to bring your already running application to the foreground, if a user tries to run it "one more time".

Dynamic Link Libraries and Delphi
Everything you ever wanted to know about DLLs and Delphi but didn't know where to look for answers (or were to afraid to ask).

Class methods
Class procedures/functions. What they are and how to find a practical use for them.

Easter Eggs
Looking for some hidden fun in Delphi? Find out what are Easter Eggs and how to add them to your applications.

ENTERing TAB
Using the Enter key like a Tab key with Delphi controls

Errors and Exceptions
How to handle errors and exceptions in Delphi.

Learning Assembler with Delphi
Delphi has always included a built-in assembler, but how to use it? This article, sought to introduce a subset of 8086 instructions and show, by example, how they might be used.

Your application will be shut down!
Access violations, invalid page faults, general protection faults; the name changes, but the nature of the problem is always the same. Find the solution to your Delphi AVs.

Backtracking
Backtracking is used to solve problems with tree structures.

Creating self extractor
Creating a Compressed, Self-Extracting Installation File.

Delphi Fundamentals Code Library
A collection of open source code libaries: AnsiString functions; Utility functions for Integer, Float, Bit, CharSet and Dynamic array manupilation; Date and Time functions; System specific (CPU or Operating System)...

Using Frames
Grouping Delphi UI elements together in true, object-oriented containers has been tried several ways as Delphi has evolved

Generating Random Numbers
Generating random numbers with Delphi within a range (for example, between 0 and 100).

Let's Get Docked
Delphi's docking machinery is both broad and deep, but unfortunately the documentation is neither. Here are the high points, and some docking wisdom born of hard-won experience.

RAR compression and Delphi
Creating a class to access RAR archives.

Procedural Types Introduction
Are you fed up of writing yet another routine to search a stringlist? Do you know about procedural types? A procedural type is a native Pascal data type of which you may not have heard, but which you are undoubtedly using.

2010. Delphi Programming by Zarko Gajic
The 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. Year 2010.

Understanding Generic Types in Delphi
Generics, a powerful addition to Delphi, were introduced in Delphi 2009 as a new langage feature. Generics or generic types (also know as...

Understanding Anonymous Methods in Delphi
With the inclusion of anonymous methods in Delphi 2009, Delphi language has a new weapon in its "what a routine can do and be used for, and how" arsenal. In short, an anonymous method is a procedure or function that does not have a name associated with it.

©2014 About.com. All rights reserved.