1. Technology

2008. Delphi Programming by Zarko Gajic

Delphi Programming Almanac For the Year 2008


All of your favorite Delphi tutorials, articles, tips and tricks, VCL top picks, tool reviews, source code projects on Delphi Programming and a lot more, sorted by date.

Delphi Almanacs: 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998.

Delphi Programming Almanac 2008

Programmatically Fix the TabOrder property in your applications - December 22, 2008
The TabOrder property available for any TWinControl descendant control (such as TButton, TEdit, TComboBox, etc.) indicates the position of the control in its parent's tab order. How many times have you "inserted" a visual component (control) between two control - and have forgotten to fix the tab order of the controls?

Get Subdirectories for a specified Directory - December 15, 2008
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.

Computer Locker - Entry #47 - December 9, 2008
What happens with your machine when you need to move away from the computer for 10 or more minutes? How secure is your data? Can someone sit on your chair while you are at a coworkers office and play with your data?

Extending TCustomEditControls (TMemo, TRichEdit) with a ViewOnly property - December 2, 2008
A mix of Enabled and ReadOnly where the control with ViewOnly set to true will not be grayed, will be read only but a user will not be able to set the input focus to the control.

Reposition Inherited Control Back to Its Original Position - December 1, 2008
When you change any of the properties of a control on the base form, for example, Color - the color of this control on the inherited form will also change. What if you need to "undo" the changes?

Executor - Entry #46
By a definition, executor is someone (or something) who executes a specific task. In software terms, executor could be an application responsible for the execution of other applications.

Get the Application associated with the Shell Print Command for a File Type - November 24, 2008
If your want to programmatically print files from Delphi code, using the associated shell application, you need to first make sure that there is an application associated with the shell's print command for a given file type.

Ant Colony Simulation - Entry #45 - November 11, 2008
Ant colony simulator tries to imitate the ants life. Denys has not been guided with known biological rules for Ants behaviour, he stablished his own rules for it, and it the simulator works great.

File Size - Get the Size of a File in Bytes using Delphi - November 10, 2008
When working with files and folders from a Delphi application you sometimes need to know what is the size of a file (in bytes).

Symmetric Canvas Drawing - Entry #44 - November 4, 2008
Wanna learn more about the TCanvas properties and mehods? Meet "Symmetric Canvas Drawing" - a tool to teach 6th formers about using the canvas and drawing on it in Delphi.

Class Helper for Delphi's TStrings: Implemented Add(Variant) - November 3, 2008
When you need to add integer values, boolean values or any other non-string values to the list you need to use some of the RTL's conversion routines (from int to string for example).

Fake Creating a New Delphi Control - Captionless Panel - October 28, 2008
I myself, in 99.99% cases, have to clear out the caption before adding any controls to a Panel - I simply do not need a caption on a panel.

Overloading Delphi's ShowMessage to accept Integer, Boolean, Float, ... - October 27, 2008
A downside of the ShowMessage is that it only accepts a string parameter - where variables tend to be integers, bools, floats, etc. :)

Add a Standard Context (popup) Menu to Delphi's TRichEdit - October 21, 2008
Delphi's implementation of the rich editor control (TRichEdit) does *not* expose the default context popup menu when the rich edit is right-clicked.

A Custom Message Dialog with Standard Windows Icons - October 20, 2008
I needed to create my own customized "MessageDlg" message box with custom buttons, but I still wanted to have access to those spiffy icons that appear when you specify "mtInformation, mtConfirmation..." as the MessageDlg message type.

Mac OS X Doc Launcher Simulator - Entry #43 - October 14, 2008
The Dock is feature of the GUI of Apple's Mac OS X operating system, which is used to launch applications, and switch between running applications.

Formatting a File Size in Bytes for Display - Convert Bytes to Delphi String (KB, MB, GB) - October 13, 2008
When working with files from Delphi you might want to display the size of a file to the user in a Explorer-like format where the file size is not displayed in bytes - but the display depends on the size of the actual file.

Snake Game - Entry #42 - October 7, 2008
Snake game has its history roots in the late 1970s. The player controls a snake which gets bigger by every piece of food it "eats". Snake must avoid hitting its own tail or the "walls" that surround the playing area.

Peg Solitare Solver - Entry #41 - September 30, 2008
Peg Solitaire (also known as Hi-Q) has very simple rules. Pegs (red circles in this implementation) are allowed to jump over adjacent (vertically or horizontally) pegs.

Controlling the Number of a Delphi application Instances on a Terminal Server - September 29, 2008
When the application is running under Terminal Services as a Remote Session the name for the file mapping object can either have "Global\" or "Local\" prefix - to explicitly create the object in the global or session namespace.

Get the Control Under the Mouse in a Delphi application - September 22, 2008
If, in your Delphi application you need to know what control is "under" the mouse while the mouse is being moved over the application, you can use RTL's FindVCLWindow function.

  1. About.com
  2. Technology
  3. Delphi
  4. Coding Delphi Applications
  5. Delphi Almanac 2008 - Tutorials, Articles, Tips and Tricks by Zarko Gajic - Year 2008

©2014 About.com. All rights reserved.