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 ...
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!
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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 [b]anonymous methods[/b] 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...
With the inclusion of [b]anonymous methods[/b] 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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)
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.
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.
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
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.
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...
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.
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.
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".
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).
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.
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.
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
Using the Enter key like a Tab key with Delphi controls
Errors and Exceptions
How to handle errors and exceptions in Delphi.
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.
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.
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.
Algorithms Alfresco: Ask A Thousand Times
How does Google work its magic? Word indexing and document searches with Delphi.
How does Google work its magic? Word indexing and document searches with Delphi.
Backtracking
Backtracking is used to solve problems with tree structures.
Backtracking is used to solve problems with tree structures.
Creating self extractor
Creating a Compressed, Self-Extracting Installation File.
Creating a Compressed, Self-Extracting Installation File.
Code Reuse Through Interfaces
How code reuse can be achieved, with aggregated Delphi interfaces. Using interfaces instead of classes is harder than just learning some new syntax. It requires a different way of thinking.
How code reuse can be achieved, with aggregated Delphi interfaces. Using interfaces instead of classes is harder than just learning some new syntax. It requires a different way of thinking.
Developing Single Source Delphi: Win32, .NET, and Linux
Learn how to write clean and maintainable single-source code across Win32, the Microsoft .NET Framework, and Linux without simply IFDEFing everything
Learn how to write clean and maintainable single-source code across Win32, the Microsoft .NET Framework, and Linux without simply IFDEFing everything
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)...
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)...
Displaying Help File Contents
Incorporating that Help file into your application.
Incorporating that Help file into your application.
Delphi 2005 and ECO II
This article provides step-by-step instructions on how to promote an existing relational database, including existing data, and how to provide a Unified Modeling Language (UML) class diagram representation of this.
This article provides step-by-step instructions on how to promote an existing relational database, including existing data, and how to provide a Unified Modeling Language (UML) class diagram representation of this.
Delphi 2005 Compiler, Language, and Debugger Enhancements
This article provides an overview of several of the new features found in Delphi 2005: For-in-do loop, Function and procedure inlining, Multi-unit namespaces, Dynamic multidimensional arrays, Delphi Win32 Language Enhancements, etc.
This article provides an overview of several of the new features found in Delphi 2005: For-in-do loop, Function and procedure inlining, Multi-unit namespaces, Dynamic multidimensional arrays, Delphi Win32 Language Enhancements, etc.
Exception Handling for Fun and Profit
Exceptions are both powerful and very misunderstood. This talk will cover exceptions from top to bottom including their purpose, proper use, and the development of your own exceptions
Exceptions are both powerful and very misunderstood. This talk will cover exceptions from top to bottom including their purpose, proper use, and the development of your own exceptions
Using Frames
Grouping Delphi UI elements together in true, object-oriented containers has been tried several ways as Delphi has evolved
Grouping Delphi UI elements together in true, object-oriented containers has been tried several ways as Delphi has evolved
From numbers to letters
A recursive implementation of a numbers-to-letters function for the English language.
A recursive implementation of a numbers-to-letters function for the English language.
Get Your Delphi Apps off to a Fast Start
Explains how and why you should create a template project. This can save you a lot of time whenever you begin a new Delphi project, as the normal "setup work" you do will already be done--setting properties, adding forms and units, etc.
Explains how and why you should create a template project. This can save you a lot of time whenever you begin a new Delphi project, as the normal "setup work" you do will already be done--setting properties, adding forms and units, etc.
Generating Random Numbers
Generating random numbers with Delphi within a range (for example, between 0 and 100).
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.
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.
Templates in Object Pascal
Here's a quick guide to implementing C++-like templates in Object Pascal
Here's a quick guide to implementing C++-like templates in Object Pascal
RAR compression and Delphi
Creating a class to access RAR archives.
Creating a class to access RAR archives.
Using non-breaking breakpoints
Non-breaking breakpoints are breakpoints that do not load Delphi's integrated debugger when they trigger. These special breakpoints are more powerful than they sound, and this article explains why.
Non-breaking breakpoints are breakpoints that do not load Delphi's integrated debugger when they trigger. These special breakpoints are more powerful than they sound, and this article explains why.
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.
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.
Writing and using Intel assembly code in Delphi
"Many programmers today associate assembler with a difficult, low-level kind of programming. They consider it fast, but most of them also think it is incomprehensible and impossible to learn. In reality, things are not that bad..."
"Many programmers today associate assembler with a difficult, low-level kind of programming. They consider it fast, but most of them also think it is incomprehensible and impossible to learn. In reality, things are not that bad..."
Ignoring Exceptions with Delphi's Integrated Debugger
Tired of always having Delphi integrated debugger load when an exception is raised? It doesn't have to be that way, and this article shows you how in Delphi 7, Delphi 8, and Kylix.
Tired of always having Delphi integrated debugger load when an exception is raised? It doesn't have to be that way, and this article shows you how in Delphi 7, Delphi 8, and Kylix.
