Articles

   

This page lists 25 articles and tutorials that discuss various aspects of programming. Choose articles of interest from the list below. Many articles include source code examples in Delphi Pascal.

Full details of copyright are displayed at the bottom of each article.

How to handle drag and drop in a TWebBrowser control
Sometimes you need to be able to customise how a TWebBrowser control handles drag and drop, or you may need to prevent the control from accepting files dropped it. This article explains how.
By Peter Johnson
How to receive data dragged from other applications
The standard Windows API method of handling drag and drop is fine for catching files dragged from Explorer, but how do we handle data dragged and dropped from other applications? This article explains.
By Peter Johnson
How to get operating system version information
We often need to detect the version and various other characteristics of the operating system from our applications. Here's how to do this from Delphi.
By Peter Johnson
How to call Delphi code from scripts running in a TWebBrowser
When using a TWebBrowser control to display a user interface you may need to call your program's Delphi code in response to user input in the TWebBrowser or to get information to be displayed by the control. This article shows how.
By Peter Johnson
How to call JavaScript functions in a TWebBrowser from Delphi
Sometimes it is necessary to call JavaScript function embedded within a document displayed in a TWebBrowser control. Here's how.
By Peter Johnson
How to extract version information using the Windows API
Excutable files can contain a resource containing version information. The Windows API provides tools for extracting the information. Here's how to use it.
By Peter Johnson
How to make a TWebBrowser become the active control when clicked
When you click inside a TWebBrowser control, it does not become the active control, unlike other controls. This article shows how to detect clicks in the control and make it the form's active control.
By Peter Johnson
How to customise the TWebBrowser user interface
When we use TWebBroswer we often want to change the way it appears and acts to fit in to our application's look and feel. Here's how to override the IE context menu, change the border style, show or hide scroll bars and style the content without changing the HTML document.
By Peter Johnson
How to set a component's default event handler
When you double click many components at design time Delphi creates an empty event handler for the default event. Sometimes you need to specify a different default event than that used by Delphi. Here's how.
By Peter Johnson
How to use the TListView OnCustomDrawXXX events
TListView's OnCustomDraw, OnCustomDrawItem and OnCustomDrawSubItems events are useful to customise the appearance on a list view control without having to handle all the painting yourself. This article shows how to use these events in a report style list view control.
By Peter Johnson
How to integrate help files into the Delphi 3-7 IDE
Information on the changes that have to be made to Delphi's help files in order for your help files to be integrated with the Delphi help system.
By Peter Johnson
How to load and save documents in TWebBrowser in a Delphi-like way
A presentation of the development of a wrapper class for TWebBrowser that simplifies navigation, the loading and saving of HTML when using the control.
By Peter Johnson
How to run a single instance of an application
Describes how to ensure only a single instance of an application runs and how to pass command line data to a running program instance.
By Peter Johnson
How to add a program to the Explorer Send To menu
A look at adding an entry to Explorer's Send To menu and handling files sent to an application using the menu.
By Peter Johnson
How to catch files dragged and dropped on an application from Explorer
A guide to using the Windows API to catch and process files dropped from Windows Explorer.
By Peter Johnson
How to create and use HTML resource files
A review of the techniques used to create HTML resources for embedding in a program, along with a discussion of Internet Explorer's use of the res:// protocol to access and display embedded HTML.
By Peter Johnson
How to get notified when the content of the clipboard changes
Sometimes we need need to know when the content of the clipboard has changed. This article shows how.
By Peter Johnson
How to detect the types of executable files
This article explains how to detect if a file is a DOS program or a 16 bit or 32 bit Windows executable program or DLL. Formerly featured as a 'Great Article' on Delphi3000.com!
By Peter Johnson
How to dynamically add data to an executable file
Here is an alternative way of embedding data in a program by appending the data to the end of the executable file as a payload. In the article we create two classes to help read and write the data.
By Peter Johnson
How to access environment variables
Every Windows process gets a copy of some environment variables. Here's how to read and update them.
By Peter Johnson
How to write filters that extend the functionality of the TStream classes
Here's the basis for a set of classes that wrap around any TStream object to allow you to write formatted data to any stream.
By Peter Johnson
How to remember a window's size, state and position
When I open an application I like to have it remember the size and position of its window when it was last closed. Here's how to do it with Delphi forms.
By Peter Johnson
How to read data embedded in your program's resources
Having embedded files and/or data in your executable (article #2) you need to get them out again - read on!
By Peter Johnson
How to store files inside an executable program
Its sometimes useful to be able to distribute read-only files embedded in your programs. This article explains why and discusses how.
By Peter Johnson
How a non-windowed component can receive messages from Windows
Sometimes we need a non-windowed component to receive Windows messages. Here's how and why.
By Peter Johnson

If you have any comments or suggestions about any of these articles please contact me.