1. Technology

2009. Delphi Programming by Zarko Gajic

Delphi Programming Almanac For the Year 2009

By

PDF Linearization with Delphi - Optimize PDF Documents for "Fast Web View" with Delphi - April 22, 2009
While there are many Delphi controls and libraries that allow creating and manipulating PDF documents, only a few have an option to linearize an existing (or new) PDF document.

Do it Yourself - Code a Diary/Planner (PIM) Type Delphi Application - April 21, 2009
In the process of writing a diary/planner (PIM) type application, I came across the need for a year planner. You know the kind of thing, much like a full year calendar showing ALL the days for ALL the months of a given year. I actually looked around on the internet for a suitable component, found quite a few, some where quite expensive, some where cheap, and some where free.

Why/When do You Use RegEx in Your Delphi Code? - April 20, 2009
What's your story? Have you ever used RegEx in Delphi? Why? What for? Let us learn something new from your experience - give us some real world examples.

RegEx / Regular Expression Components for Delphi - April 14, 2009
A regular expression (regex, regexp) is a string that describes or matches a set of strings, according to certain syntax rules. Regular expressions are used as a powerful and convenient way to recognise patterns in text. Using regular expressions you can validate e-mail adresses, extract ZIP-codes from documents, search for complex patterns in files and much more.

Real World Examples Needed: Why/What do you Send Between Delphi Applications? - April 13, 2009
What's your practice? Have you ever needed for two of your Delphi applications to communicate? Why? How do you send information between your Delphi applications? What do you send? Let us learn something new from your expirience.

Check if a given File Name is Valid using Delphi - April 7, 2009
The code does what Windows Explorer warns about if you try to name a file using invalid characters: A file name cannot contain any of the following characters: \ / : * ? " < > |

Is Computer Joined to a Domain - Programmatically Check using Delphi - April 6, 2009
If a computer is a part of a network it can either be part of a workgroup or a domain. If you need to programmatically check if a machine running your application is a part of a domain you can exploit functions found in the netapi32.dll. The trick is in using the NetRenameMachineInDomain function which can be used to change the name of a computer in a domain.

Interfaces in Delphi Programming 101 - Defining an Interface; Implementing an Interface - March 31, 2009
If you are up to creating a rock solid application in a way that your code is maintainable, reusable, and flexible the OOP nature of Delphi will help you drive the first 70% of your route. Defining interfaces and implementing them will help with the remaining 30%.

Convert a Drive Letter ("C") to a Drive Number (3) - March 24, 2009
I have an application that needs to "export" a set of files into a specified folder on a drive. Files can come from variuos sources: hard disk, usb disk, network drive, etc. DiskFree returns the number of free bytes on the specified drive but takes a drive number as a parameter. How to convert a drive letter to a drive numer...

Serialize / Stream (Read/Write) Configuration Settings in your Delphi application - March 24, 2009
While using INI files to store application specific configuration data is a piece of cake in Delphi, INI files are simple text files - and everyone could mess up the information inside using a simple Notepad. Learn how to save published properties of a class into a stream / file (binary serialization) and read back. Use it to store application specific configuration data.

Programmatically Check If File is In Use - Delphi Code - March 23, 2009
A custom function IsFileInUse will return true if the file is locked for exclusive access. It would fail (return false) if the file doesn't exist at all. Two things need to be checked here: A) Is the file a READ-ONLY file? and B) Is the file in use?

THook Delphi Class with Source - Use Windows Hooks in your Delphi applications - March 17, 2009
Put shortly, a hook is a function you can create as part of a dll or your application to monitor the 'goings on' inside the Windows operating system.

Get Enum Information using RTTI - March 16, 2009
In Delphi, enumaration types or Enum provides a way of to define a list of values. The values have no inherent meaning, and their ordinality follows the sequence in which the identifiers are listed. RTTI methods allow you to "dive" into Delphi enumerated types and values to get the values as string to get the number of elements, ...

Synchronizing Threads and GUI in Delphi application - March 10, 2009
To speed up data processing in your application you can decide to include one or more "secondary" threads. When several threads are running in the application a question arises: how to update your GUI (user interface) as a result of a thread execution. The question lies in the TThread class Synchronize method.

Remove Duplicate Items in Delphi's TStringList - March 3, 2009
Many Delphi controls like TListBox, TComboBox and TMemo, for example, expose a property which is of the TStrings type: Items for TListBox, Lines for TMemo. When you fill in a string list with string items you might end up with a list holding duplicate strings - more than one item with the 'same' string value.

Using Margins and Padding Properties in Delphi's VCL - March 3, 2009
One of the neateast new properties (in Delphi versions 2006 and up) you can find in the Object Inspector are the Margins, Padding and AllignWithMargins. For me, there's no user interface like the one you can set up using just a few panels, their Align property and now with the help of Margins and Padding the UI gets even better.

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

©2014 About.com. All rights reserved.