Archive for August, 2008

Property Editors in Delphi 2007

Friday, August 29th, 2008

I just finished port some old custom controls from Delphi 5 to Delphi 2007 and learned about some more differences between Delphi 5 and Delphi 2007.

  1. If you have written your own property editors you have to add DesignIntf rather than DsgnIntf and you need to add DesignIde.dcp to your projects Requires list. It is no longer possible to hard link DsgnIntf.dcu (or DesignIntf.dcu for that matter) into your project as it will no longer compile.
  2. If you wrote design editors to provide meaningful choices in the combobox for enumerated properties, this is no longer necessary. Delphi 2007 will use the names of the enumerated values in the combobox without the use of a custom property editor.

Custom Components in Delphi 2007

Friday, August 29th, 2008

Delphi 2007 and I had a bit of a tussle this afternoon. I had just finished porting some of my custom controls from Delphi 5 to Delphi 2007 and suddenly Delphi 2007 started crashing immediately after completing a compile. These components have been working without problems for years. What the heck?????

After much diddling around it seems as though Delphi 2007 really doesn’t like combined design / run time packages. Having combined packages was always a bad idea but Delphi 2007 really seems to hate them. After I put all of the design time things (property editors) into a separate design time package and removed them from the run time package everything went back to working just fine.

I had planned to do this anyway because it seems to be impossible to compile an application by hard linking a combined design / run time package into it. This causes all kinds of compile errors when it tries to compile DesginIntf. This is another issue entirely and is the subject of another post.


Delphi 5 & Printers.pas

Monday, August 18th, 2008

There are all kinds of bugs in the printers.pas module in Delphi 5. Over the years I’ve been fixing them as I find them and I figured it is time that I documented what I know. The problems that I have encountered are:

  • SetToDefaultPrinter was being called at inappropriate times when setting a new printer via PrinterIndex.
  • SetPrinter was not being called when setting a new printer via PrinterIndex. This resulted in the old printer’s properties being retained.
  • SetToDefaultPrinter was using obsolete methods of obtaining the default printer name. This was causing problems on server class operating systems.
  • Dialogs.GetPrinter was throwing an access violation if long printer names (> 80 bytes) where encountered.

You can find versions of printers.pas and dialogs.pas with fixes for these problems at:

Changed code is flagged with SWB at the end of the line.


Installing the Firebird .Net Data Provider into Visual Studio

Thursday, August 14th, 2008

I just spent a frustrating few hours trying to install the Firebird .Net Data Provider into Visual Studio. Installing the data access components itself is not terribly difficult but installing the GUI designer (DDEX) is another matter altogether.

I am only going to discuss the installation procedures for 32 bit systems here, since that is what I use and I have no way to verify the 64 bit installation instructions.