Coding Services
Prestwood
Coding Services
Prestwood Software offers a full line of coding services including developer help, maintenance coding, conversions, testing, database design, and more.


Prestwood eMagazine
Subscribe to our popular FREE monthly eMagazine.

Enter your email:

Subscription Center
 
Support Us!
Support this community,
buy from our store!

Delphi COM Programming

$45.00
Visit Store
Online Now: 595 Guests, 14 Members>>>Tsaroth  ghouila_s  frumiami   bfranklin  pronegot  apeeters2  O.J. Newman   Nicole Prestwood  S 0 n Y  rchristiansen   Char Berta  Adam Lum  maostro  Daniel Fought  

Not a member of our community? Join Now!

Delphi for Win32 Group

Delphi group covering all aspects of Delphi for Win32 and the upcoming Delphi for Win64 as well as a Kylix archive.

Since its inception, Delphi has proven itself the RAD development system for Win32 applications.

Designed specifically to "play nice" with virtually every database in existence, Delphi has long been the choice of serious developers that need to produce sophisticated, high-performance, custom applications.  One of Delphi's strengths has alway been the incredibly diverse and rich 3rd party component  libraries that extend Delphi's already considerable power.

Delphi continues to be a viable candidate for new projects. It still creates the fastest native-code Win32  applications and with the upcoming Delphi for Win64, Delphi applications will have the ability to take advantage of 64-bit processors. Delphi for .Net is a serious competitor of Visual Studio.Net and worth considering for your projects.

Also consider joining our...



This page lists NEW and UPDATED Delphi for Win32 content from all areas (news, message board, knowledge base, blogs, comments, FAQ lists, file library, resumes, job postings, etc.). In addition, this page contains weekly content posted each Monday at 1 AM from our tib-bits (smaller KB posts).

Delphi News

5/26/2008
New DevExpress Updates Now Available
List of releases available as part of the newest update of Express Install, v1.36.

5/9/2008
Delphi Acquired by Embarcadero Technologies
CodeGear, Borland's development tools division is being acquired by Embarcadero Technologies.

6/16/2007
So Many Great Databases: Can It Get Any Better?
Contemporary databases provide incredible features, and supporting tools. Even so, there is one "add on" you should know about.

2/20/2007
Delphi 2007 for Win32 Launches!
CodeGear Introduces Delphi for Win32, Providing RAD Development for Windows Vista and AJAX. New RAD Environment Allows Developers to Jump-start Microsoft Windows Vista Applications While Seamlessly Supporting Existing Users.

2/20/2007
Delphi for PHP Announced
Delphi for PHP brings RAD productivity benefits to PHP Web developers that Delphi users have enjoyed for years. PHP is the most prominent dynamic Web language today and one of the top 10 programming languages overall. Delphi for PHP is designed to take PHP development to the next-level by making it faster and easier to develop rich, database-driven Web applications.


Our Delphi News List | Post Your News

Weekly Delphi Content!

Week 27, Posted Monday 7/7/2008

Content changes every Monday @ 1AM!! Check back once per week. Learn! Review! Test Yourself!

Tip of the Week
Tip: Before adding many new entries to a TStringList, set its Sorted property to false. Add all your entries. Finally, set the Sorted property back to True (if desired). Sorting is expensive, in terms of macnine cycles. By leaving the Sorted property set to True, you force the TStingList to re-sort itself after each entry. This can significantly slow things down. This applies to TStrings, as well, and all components that have a TStrings property, like TListBox, etc.
FAQ of the Week
Question: Why do I have to specify virtual when creating an abstract method? Why not just abstract?

Answer:

For abstract methods, you must specify either regular virtual with the virtual keyword or dynamic virtual with the dynamic keyword. In Delphi for Win32, virtual methods are optimized for speed and dynamic methods are optimized for size. The Delphi help indicates to use virtual for most situations. 

It is true that the compiler could make virtual the default and therefore optional but requiring one or the other is consistent with Object Pascal's strong typing.


Definition of the Week
Delphi Unary Operators - An operation with only one operand (a single input). In Object Pascal, a unary operator (+,-, and ^) always precedes its operand (for example, -B), except for ^, which follows its operand (for example, P^).
Link of the Week
Magazine: Blaise Pascal

With the demise of Delphi Informant, we've gone quite a while without a good, English language Delphi periodical.

It's exciting, then, so see the appearance of an English edition of Blaise Pascal, especially given it's lineup of writers; Nick Hodges, Bob Swart, Kim Madsen, Julian Bucknall, Jeremy North, and Hallvard Vassbotn. That's a virtual "who's who" of the lofty world of Delphi gurus.

A quick, simple, free registration gets you access to a PDF version of one issue. Check it out!


Code Snippet of the Week
What does this code do?
procedure TUtils.Delay(MillisecondsDelay: Integer);
var
   FirstTickCount: LongInt;
begin
     FirstTickCount := GetTickCount;
     repeat 
           Application.ProcessMessages;
     until ((GetTickCount-FirstTickCount) >= Longint(MillisecondsDelay));
end;
File of the Week
Delphi for PHP Free Trial

Delphi Board Overview Q&A!

Techie talk! Post your Q&A to our Delphi board. Our custom built message board uses a traditional Q&A message board format you can browse, search, post new topics, and reply to existing topics.
 TopicThreadsPostsLast Active ThreadLast By
Sign In To Check If Stuff Is New Delphi COM / ActiveX / DCOM2249
How do I access menu comman...
by Neophyte185
Sign In To Check If Stuff Is New Delphi Distributed Apps48158
MSSQL locks on ApplyUpdates...
by pooh
Sign In To Check If Stuff Is New Delphi Internet Solutions4992
Calendar Components...
by the7son_ms
Sign In To Check If Stuff Is New Delphi News / Other227710
RE: CodeGear has a new home...
by Rick Carter
Sign In To Check If Stuff Is New Delphi Object PASCAL103589
Creating simple PDF files...
by hyp3n0zy5
Sign In To Check If Stuff Is New Delphi Single User Apps191503
Slow access to ADO table on...
by Ron.Roper
Sign In To Check If Stuff Is New Delphi User Groups56
Delphi User Groups LIsting...
by mprestwood
Sign In To Check If Stuff Is New Delphi VCL64252
RE: problem with the code- ...
by Wes
Sign In To Check If Stuff Is New Kylix (Archive)1035
Suse 9.1 and Kylix 3...
by jwerfel

New Delphi MB Posts

  Thread
Started ByReplies
Last ByTopicViews
Sign In To Check If Stuff Is New ! CodeGear has a new home!
Posted 5/11/2008, Updated 6/3/2008
Rick Carter 16 Rick CarterDelphi News / Other887
Sign In To Check If Stuff Is New problem with the code- dont know where
Posted 5/8/2008, Updated 5/12/2008
pkakkar7 WesDelphi VCL456
Sign In To Check If Stuff Is New Pascal Database Toolbox (TAccess)
Posted 9/1/2002, Updated 5/8/2008
Jarmulowicz 6 peterw1956Delphi Object PASCAL428
Sign In To Check If Stuff Is New Tip: Create Round Windows
Posted 11/27/2000, Updated 4/24/2008
Larry J. Rutledge 1 psantoroDelphi News / Other246
Sign In To Check If Stuff Is New Delphi User Groups LIsting
Posted 3/26/2008, Updated 3/26/2008
Mike Prestwood1 psantoroDelphi User Groups296
Sign In To Check If Stuff Is New Calendar Components
Posted 3/18/2008, Updated 3/18/2008
the7son_ms1 WesDelphi Internet Solutions303
Sign In To Check If Stuff Is New Using TWebbrowser to enter text and click button
Posted 3/12/2008, Updated 3/13/2008
riotboy1 WesDelphi VCL324
Sign In To Check If Stuff Is New Slow access to ADO table on 2nd pass
Posted 3/5/2008, Updated 3/10/2008
Ron.Roper1 WesDelphi Single User Apps327
Sign In To Check If Stuff Is New Database Problems
Posted 10/4/2007, Updated 3/1/2008
Daydreamer3 WesDelphi Single User Apps243
Sign In To Check If Stuff Is New Creating simple PDF files
Posted 12/8/2005, Updated 2/12/2008
hyp3n0zy54 WesDelphi Object PASCAL335

New Thread Notifications

New thread subscribers: adorraga   edaurdoamped    ferganyalex   jpgolay   Mike Prestwood   moudy   owen.moore   pkakkar   rbrownsr   the7son_ms  

Want to subscribe? Sign in to subscribe to new threads posted to this group.

New Delphi Knowledge Base Articles

    KB Article By KB Topic Group Counters

FAQ
Flashcard

1. Virual; Abstract; vs. Dynamic; Abstract;

Question: Why do I have to specify virtual when creating an abstract method? Why not just abstract?
  +Add Comment (2 Comments  last by mprestwood )
Mike Prestwood
OOP Delphi for Win32 All: 88
Members: 0
Non-Mem: 87
Mods: 0
Clients: 0
Staff: 1

FAQ
Flashcard

2. Native Code versus Managed .Net Code

Question: What are the benefits of Win32/64 native code over .Net?
  +Add Comment (0 Comments )
Mike Prestwood
Beginners Corner Delphi for Win32 All: 90
Members: 0
Non-Mem: 90
Mods: 0
Clients: 0
Staff: 0

Definition
Flashcard

3. Delphi Module

Short Definition: A unit. A unit is defined in its own source file (a .PAS file) that contains types (including classes), constants, variables, and routines (functions and procedures). Each unit begins with unit UnitName; where UnitName must match the filename (minus the .PAS extension). The .PAS unit files are compiled into Delphi Compiled Units with a .DCU extension. A Delphi program is constructed from units. Specifically, the .DCU files are linked into your application. The Delphi compiler is very fast because it only recompiles units that have changed. You can force Delphi to recompile all units with a build all.
  +Add Comment (0 Comments )
Mike Prestwood
Beginners Corner Delphi for Win32 All: 77
Members: 0
Non-Mem: 77
Mods: 0
Clients: 0
Staff: 0

FAQ
Flashcard

4. Protected versus Strict Protected

Question: What is the difference between Protected and Strict Protected visibility?
  +Add Comment (0 Comments )
Mike Prestwood
OOP Delphi for Win32 All: 65
Members: 0
Non-Mem: 65
Mods: 0
Clients: 0
Staff: 0

Definition
Flashcard

5. Strict Visibility

Short Definition: The Strict specifier tightens up the scope for private and protected. With Strict Private, members within a class are visible ONLY within the class declared and Strict Protected are visible only within the class declared and descendent classes. Without strict, private and protected members can also be seen by all classes declared in the same unit (friendly classes). The Strict specifier was introduced with Delphi for .Net preview in Delphi 7 in an update to the .Net compiler preview and with Win32 in Delphi 2005 to fully comply with the .NET CLS. Delphi's traditional private specifier maps to the CLR's assembly visibility and the protected specifier maps to the CLR's assembly or family visibility.
  +Add Comment (0 Comments )
Mike Prestwood
OOP Delphi for Win32 All: 84
Members: 0
Non-Mem: 84
Mods: 0
Clients: 0
Staff: 0

Updated Delphi Knowledge Base Articles

    KB Article By KB Topic Group Counters

Post

1. Using BDE TTables to read or write text file records

How to read or write data from comma-delimeted or fixed length record text files in Borland Delphi.
  +Add Comment (1 Comments )
Scott
BDE Delphi for Win32 All: 487
Members: 0
Non-Mem: 481
Mods: 1
Clients: 0
Staff: 4

Tip

2. Associative Arrays in Delphi/Object Pascal

Tip: Although Object Pascal doesn't have a native associative array, many developers just use a TStringList. Others have implemented a true associative array in Object Pascal. Search the Internet for TStringHash and THashedStringList classes for examples.
  +Add Comment (0 Comments )
Mike Prestwood
Language Reference Delphi for Win32 All: 151
Members: 0
Non-Mem: 150
Mods: 0
Clients: 0
Staff: 1

Post

3. Set File Extension to Always Show in Explorer

The default setting in Windows Explorer is to always hide known file extensions. This Delphi code shows you how to programatically set your own extension to always show in Explorer.
  +Add Comment (1 Comments )
Scott
Coding Tasks Delphi for Win32 All: 356
Members: 0
Non-Mem: 353
Mods: 0
Clients: 0
Staff: 3

Post

4. Using GetHeapStatus

Memory Management and Delphi
  +Add Comment (1 Comments  last by david_chesnet )
Mike Prestwood
Coding Tasks Delphi for Win32 All: 421
Members: 8
Non-Mem: 413
Mods: 0
Clients: 0
Staff: 0

Article

5. Sub-Classing the BDE TQuery Component

First in a series
  +Add Comment (0 Comments )
Joshua Delahunty
Delphi for Win32 Delphi for Win32 All: 372
Members: 5
Non-Mem: 364
Mods: 0
Clients: 0
Staff: 3

New Delphi KB Comments/Entries

Mike Prestwood
Prestwood Software
Send mprestwood a Private Message Visit mprestwood's Home Page
PS Staff
Moderator
Rank: Fleet Admiral

Joined: Oct 2000
Visits: 21312
MB Posts: 971

KB Articles: 864

Location: Citrus Heights, CA USA
Tuesday, July 01, 2008 Read | +Add Comment

Also of note...

In Delphi for .Net, there is no difference between virtual and dynamic.



Regarding...
Virual; Abstract; vs. Dynamic; Abstract;
Why do I have to specify virtual when creating an abstract method? Why not just abstract?

Mike Prestwood
Prestwood Software
Send mprestwood a Private Message Visit mprestwood's Home Page
PS Staff
Moderator
Rank: Fleet Admiral

Joined: Oct 2000
Visits: 21312
MB Posts: 971

KB Articles: 864

Location: Citrus Heights, CA USA
Tuesday, July 01, 2008 (Updated 7/1/2008 5:34:05 PM)
Read | +Add Comment

Here is the syntax in question:

function Age: Integer; Abstract; //Does not work.

 

The above returns the following error:

[Pascal Error] poc_ClassTestsUnit1.pas(23): E2167 Abstract methods must be virtual or dynamic

 

Here is the correct syntax:

function Age: Integer; Virtual; Abstract; //Optimized for speed and most common.
 
function Age: Integer; Dynamic; Abstract; //Optimized for size.

 

For example, here is a complete simple class example:

  TMyClass = class(TObject)
  private
    function Name: String;
  public
    function Age: Integer; Abstract;
  end;

 

Then in a descendent class, you implement it:

//Class declaration...
TMyClass2 = class(TMyClass)
public
  function Age: Integer;
end;
 
 
//Method implementation...
function TMyClass2.Age: Integer;
begin
  Age := 12;
end;


Regarding...
Virual; Abstract; vs. Dynamic; Abstract;
Why do I have to specify virtual when creating an abstract method? Why not just abstract?

Mike Prestwood
Prestwood Software
Send mprestwood a Private Message Visit mprestwood's Home Page
PS Staff
Moderator
Rank: Fleet Admiral

Joined: Oct 2000
Visits: 21312
MB Posts: 971

KB Articles: 864

Location: Citrus Heights, CA USA
Wednesday, June 25, 2008 (Updated 6/25/2008 7:28:57 PM)
Read | +Add Comment

For more information on the history of Pascal Casing:



Regarding...
Camel versus Pascal Casing
What is the difference between Camel Casing and Pascal Casing?

Mike Prestwood
Prestwood Software
Send mprestwood a Private Message Visit mprestwood's Home Page
PS Staff
Moderator
Rank: Fleet Admiral

Joined: Oct 2000
Visits: 21312
MB Posts: 971

KB Articles: 864

Location: Citrus Heights, CA USA
Wednesday, June 18, 2008 (Updated 6/18/2008 9:11:21 PM)
Read | +Add Comment

Thanks Wes for adding to this code snippet. Mucho appreciated!



Regarding...
Associative Arrays in Delphi/Object Pascal (Use TStringList)

TStringList Example
Object Pascal doesn't have a native associative array, but you can use a TStringList the same way. (Alternatively, search the Internet for TStringHash and THashedStringList classes for implementations of a true associative array).


Wes Peterson
Prestwood Software
Send Wes a Private Message Visit Wes's Home Page
PS Staff
Moderator
Rank: Commander

Joined: Jan 2004
Visits: 699
MB Posts: 66

KB Articles: 96

Location: Citrus Heights, CA USA
Wednesday, June 18, 2008 (Updated 6/18/2008 2:25:22 PM)
Read | +Add Comment

Another Delphi candidate to stand in for an associative array is TObjectList. It holds a list of pointers to any object you care to create.  If you have a class with multiple members, you can associate many values - of many different types - in your class instances, then put them in a TObjectList.

One important Boolean propety of TObjectList is OwnsObjects.  If set to True, your TObjectList instance will free the objects it stores when it is freed, as well as upon some other operations (see Delphi help for details). If False, it's up to you to free all the objects - probably before freeing the ObjectList.

The downside (an upside in some cases) to TObjectList is that it has no predefined sorting mechanism, which makes sense, because it really has no idea what it contains.  You'll have to write your own "Compare," a TListSortCompare function.  Again, see Delphi help.



Regarding...
Associative Arrays in Delphi/Object Pascal (Use TStringList)

TStringList Example
Object Pascal doesn't have a native associative array, but you can use a TStringList the same way. (Alternatively, search the Internet for TStringHash and THashedStringList classes for implementations of a true associative array).


Recruiters and Employers

Prestwood Staffing Options
To receive an email notification when a new resume is posted to this group, you must post at least one job posting and specify this group as one of your 3 job posting groups. When there is a reasonable match, either the applicant is near your location, your willing to pay for relocation and/or the applicant is willing to relocate, or remote work is a possibility, our system will automatically notify you.

Employer Overview

 

Featured Delphi Job Posting

Receive New Job Postings? To receive an email notification when a new job posting is posted to this group, you must post your resume and specify this group as one of your 3 resume groups. When there is a reasonable match, either the job is near your location or remote work is a possibility, our system will automatically notify you.

1 Job Postings...

1.  View Job Posting Job #123: book keeper needed
work at home and get payed weekly

Compensation: Negotiable
Industry: Health
Area Code: +44
Physical Location: iowa, IA USA

Ad Dates: 4/7/2008 thru 6/6/2008
Need Now @Prestwood 3+ Months Full-time Corp Pref./Emp. Okay

Delphi Tip: ADS Master/Detail Dataset in Delphi 6

by Scott Wehrly

Tips and techniques for creating a typical master/detail relationship between Advantage Database Server tables in a Delphi 6 form. This article also includes tips for using client datasets in relationships between ADS tables.

Online Delphi Lessons

Let the web teach you Delphi with these short, easy to read and follow, lessons.

Creating and Using Arrays

Simple examples of creating and using arrays in Delphi.

Displaying Things In Delphi

Beginner level introduction to Delphi. Demonstrates how to use ShowMessage and others simple techniques to display messages to your users.

Heterogeneous Joins in Delphi

By Mike Benemelis. A heterogeneous join is when you join tables from two different SQL servers (or a server and a local table) within the same query. This short article will show you how to perform such queries using Delphi.

Packing dBASE and Paradox Tables

Information on reindexing and packing Paradox and dBASE tables.

Using Case Statements

Instead of using a bunch of complex nested if statements, you can use a case statement to provide a more readable alternative so long as the conditionals return an integer.

Using Null Terminated and PChar Strings

ObjectPascal has two varieties of string variables: Pascal strings and PChar strings.

Using Sets

Simple example of using a set.

 

Delphi Articles

COM Collections (125 KB PDF)

Abstract: Correctly implementing COM collections.

By William Pantoja. For developers to communicate among the applications they develop, Microsoft has provided an evolutionary path from DDE, OLE, OLE2, to COM (DCOM allows you to communicate between applications on different or distributed machines).

Developing Web Servers with Delphi
By Kim Berry, Prestwood Software & Consulting

A Delphi web server can be an extension of IIS accessed as COM objects, or it can be a stand-alone program, providing the maximum flexibility to meet particular needs.

Mainframe Connectivity via SNA Server

by Kim Berry, Prestwood Software
Abstract: An overview of using Delphi to connect to the DMV.

Windows Shell Extensions
by Larry J. Rutledge

Shell extensions allow developers to add functionality to the existing Windows™ shell.

Writing High Quality Routines in Delphi
By Mike Prestwood

This Power Point presentation presents coupling, cohesion, and scope from an OO Delphi point of view. This presentation was given at the 1998 August Sacramento Delphi User Group meeting.


Borland

BDE is Dying Discussion

Special Report: BorCon 2001


Database

Common Field Types and Lengths

Common Field Types and Lengths

Common Table Structures

Data Normalization - A Primer

Data Element Naming Standard

Corporate Database Administration

SQL Lesson: Finding Duplicate Values


dBASE

dBASE Table Specifications


Delphi (Delphi Info @ Prestwood)

COM Collections

Creating and Using Arrays

Developing Web Servers with Delphi 5

Displaying Things In Delphi

Heterogeneous Joins in Delphi

Mainframe Connectivity via SNA Server

Packing dBASE and Paradox Tables

Record Types

Using Null Terminated and PChar Strings

Using Case Statements

Using Sets

Windows Shell Extensions

Writing High Quality Routines in Delphi

 


Interbase

Interbase Database Specs


Object Orientation

Introduction to Object Orientation

Polymorphism Discussion


Unified Modeling Language (UML)

UML 1.4 Introduction

 


Delphi Gazette Archive

Although we don't have time any more to release a monthly newsletter, here are is the archive of past newsletters.

  • Delphi Gazette - Nov 1998 - Volume 1, Issue 10
  • Delphi Gazette - Oct 1998 - Volume 1, Issue 9
  • Delphi Gazette - August 1998 - Volume 1, Issue 8
    The August issue contains A New Look At Exceptions by Robert Muir, Using JPEGs in resource files by Larry J. Rutledge, Windows file association, Writing out Delphi source code to HTML, and more!
  • Delphi Gazette - July 1998 - Volume 1, Issue 7
    The July issue was skipped because Larry J. Rutledge, our editor, broke his collar bone.
     
  • Delphi Gazette - June 1998 - Volume 1, Issue 6
    The June issue covers Callback Procedures Using Delphi 3.0 by Dan Anaya, our Delphi Apprentice column covers several topics, and in our Components 101 column Larry J. Rutledge  covers how to Auto-Repeat TSpeedButtons. Much more included!
  • Delphi Gazette - May 1998 - Volume 1, Issue 5
    The May issue covers Incremental Lookups in our Delphi Apprentice column, and TFileInfo in our Components 101 column.
  • Delphi Gazette - April 1998 - Volume 1, Issue 4
    Last Month, Mike Prestwood demonstrated how to design an object in Delphi by creating a TSysTime object. This month we'll extend it, adding needed funtionality to take an example class and make it more useful. Also in this issue is how to determine the cursor position in a TM