Home
Contact us

HOME

SITE MAP

FREE SOFTWARE

TUTORIALS

PRIVACY STATEMENT

Introduction - by Paul Griffiths

For many years I have benefited from the spirit of cooperation and sharing that exists within the programming community. In particular the Delphi community has actively shared code and information. In an attempt to partially repay those who have given their time and expertise to provide Delphi source code to other programmers on the Internet, I have prepared a few simple tutorials. Each tutorial includes source code that can be copied into your own Delphi program. I hope you find them helpful.


Miscellaneous Tutorials

These tutorials provide step-by-step instructions to help you accomplish specific programming tasks using Delphi and the Object Pascal Language.
 

Pause your Delphi program using Sleep

 

Two simple solutions to pause program execution in Delphi without adversely affecting system performance.

 

 

The correct file size from FindFirst

 

Obtain the correct file size from FindFirst and FindNext, even when the file is larger than 2GB.

 

 

Converting TFileTime to TDateTime

 

The date and time that a file was created, accessed and modified are expressed in Coordinated Universal Time (UTC) format. This tutorial shows you how to convert the data to a Delphi TDateTime object value.

 

 

The Windows API

A series of tutorials aimed at the Delphi programmer who seeks a greater understanding of the use of Windows APIs. The focus is on developing a progressively stronger understanding and appreciation for the tools that enable your program to communicate with the Windows Application Programming Interface.
 

Introducing the Win32 API

 

An introduction to Windows APIs for Delphi programmers. This is the first of a series of tutorials that will (hopefully) get you up and running with the API in no time.

 

 

Microsoft Win32 Programmer Reference

 

A guide for the Delphi programmer on finding and understanding this invaluable resource for anyone that wants to use the Win32 API.

 

 

Using Pointers in Delphi

 

The Win32 API makes extensive use of pointers. An understanding of pointers is important for successfully using the Win32 API. This tutorial provides a quick introduction to the concept of pointers in the Object Pascal programming language. A sample program is developed to aid in understanding.

 

 

Common Windows Data Types

 

The Win32 API uses its own set of data types. These differ from what we are accustomed to in Object Pascal. This tutorial provides an introduction and list of the common Windows Data Types. The GetLocaleInfo API function is used to illustrate.

 

 

C Primer for Delphi Programmers

 

An introduction to C for Delphi programmers. This tutorial helps you to understand C source code listings and gain further insight into the use of Windows API functions. A C code snippet that uses an API function is converted into Delphi's Object Pascal.

 

 

Convert TFileTime to TDateTime

 

When you use FindFirst, FindNext, FindFirstFile or FindNextFile the system returns information about files including the creation, last accessed and modified data in UTC format. This tutorial explains how to convert the UTC format times to Delphi TDateTime values.

 

  Using FindFirstFile and FindNextFile  

Explores the FindFirstFile and FindNextFile API functions and the WIN32_FIND_DATA structure.

 

 

Extracting Icons from files

 

The Windows ExtractIcon, ExtractIconEx and ExtractAssociatedIcon API functions can be used to extract icons from files. This tutorial explores those functions and provides a few examples.

 

 

Multi-byte, single-byte and Unicode

 

This tutorial explains single-byte, multi-byte and Unicode characters and documents the MultiByteToWideChar API function.

 

 

Code Snippets

These sample code snippets and functions perform a particular task.

 

Get the associated Icon File

 

A function to determine the full path and file name which contains the icon associated with a particular file.

 

 

Get the associated EXE file

 

A function to determine the full path and file name which contains the executable associated with a particular files open command.