The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

Happy birthday Delphi, have some wine

Posted by jpluimers on 2016/02/14

Now that you’re 21, have a glass of wine and watch this great presentation by Warren Postma which he made for last years birthday:

–jeroen

Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

BLDN: December 2015 XE7/XE8 Update Subscription Update got released 20160211 with backported 10 Seattle fixes

Posted by jpluimers on 2016/02/13

Seems they got only released just yesterday because of the QA effort taking a long time. But it’s good news for Delphi/Rad Studio/C++-Builder Update Subscription members: some fixes are now back-ported to 2 Delphi versions. Which is a new milestone in support from Embarcadero.

Anyway: BLDN.

Note that the list of fixes is at the bottom of these pages:

Source: RAD Studio Hotfixes for XE8 and XE7 with 10 Seattle fixes

I also found out that I never updated the links for XE8 update 1 downloads (I did the original XE8 links Delphi XE8 is out with version 22.0.19027.8951; Spring4D is almost ready. « The Wiert Corner – irregular stream of stuff) so there they are:

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

You find a lot of stuff when you are reorganizing your office #TP6 Library…

Posted by jpluimers on 2016/02/11

You find a lot of stuff when you are reorganizing your office #TP6  Library….

I must clean out my closets as well. I think I have similar stuff lying around.

–jeroen

Posted in Delphi, Development, History, Software Development, Turbo Pascal | Leave a Comment »

When your license check is faulty and causes customers to loose work it’s a cardinal sin

Posted by jpluimers on 2016/02/04

I wrote about this before, named it a cardinal sin too, but I seem to have to repeat this:

When your product thinks the license is validate and quits without allowing the customer to save its work, then you’ve committed a cardinal sin.

Yes, I can talk about cardinal sins: I’ve been named after the artist Hieronymus Bosch (:

For me it is OK if a product checks for binaries that do not to the product (and not signed by the vendor) in the product directories and fails to start, or to present a nag screen that takes a while to disappear, or even to limit functionality.

But:

  1. The product should always tell why the license check failed.
  2. The product never can force the customer to loose work.
  3. The documentation should show failure situations (not just the OK counterparts).

Given some recent posts and the fact that over the course of 10 different versions I lost days of work and at conferences I usually get multiple questions from people having suffered from this, I really had to bring this up again.

Read the rest of this entry »

Posted in Delphi, Development, Licensing, Software Development | 7 Comments »

Windows Vista/7/8/… hangs for Windows Common dialogs when your COM initialisation is wrong

Posted by jpluimers on 2016/02/03

A while ago I bumped into this: As of Windows 7 (and probably Vista), the standard Windows Common Item (Open and Save) Dialogs expect the main thread to be initialised with STA because it is easier to support apartment threading in single-threaded apartments because COM provides synchronization on a per-call basis and the Windows GUI APIs are not guaranteed to be thread safe.

Windows XP and Server 2003 didn’t enforce this for the classic Windows Open and Save Dialogs, so it only appeared when the software below got run on Windows 7 in a way too late time frame (but the market share of XP is still high).

The reason is that when using Delphi, the TOpenDialog and TSaveDialog will use the classic Open and Save Dialogs on Windows < Vista and fall-forward to the new Common Item Dialogs handled by TFileOpenDialog and TFileSaveDialog (both will not fall backward).

When you have your COM initialisation done wrong, your application appears to hang. Amidst the plethora of threads started by the COM subsystem, these two dead-lock:

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

The forks of SynEdit (in case I need it in Unicode)

Posted by jpluimers on 2016/01/19

Just in case I need SynEdit in Unicode:

Old SVN versions are at

Newer Github repositories are at

The finaly one has a Demos folder and links to the original ANSI version. It seems the only version for which SynGen works in Unicode Delphi versions.

–jeroen

via Missed link? Anyone know what happens there? :) Once again: 1.SynEdit?  ….

Posted in Delphi, Delphi 10 Seattle, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

From my paper archives: early QuickReport materials and BDE network installation tips

Posted by jpluimers on 2016/01/01

[WayBack] While cleaning up my “attic”, I came across some old QuickReport 1.0 documents and BDE installation tips so I scanned them.

I think the first document is by this Lars Søndergaard.

The last is by Dave Robinson, then working at Amber Computer Systems Inc, but I could not find on-line activity of him If you know him, please let me know his on-line contact info.

–jeroen

Posted in Delphi, Delphi 1, Development, History, Software Development | 2 Comments »

Windows applications: Icons and the Shell; names, sizes, etc.

Posted by jpluimers on 2015/12/23

When adding Icons to your Windows applications a few things matter.

Selecting the icon resource

The icon selected by the Windows Shell (for modern Windows versions usually Windows Explorer), is the one with the lowest ID. When there is no icon with an ID, it selects the icon with the lowest name.

Icons in Windows can have both IDs and names. Even though API calls like LoadIcon have an lpIconName parameter, you can convert the ID to a name using MAKEINTRESOURCE.

There is a difference between the format of an ICO file and the icon resource (technically two things: RT_GROUP_ICON resource directory and an RT_ICON resource for each image) contains a list of icon images.

The selection process is on the RT_GROUP_ICON, and then within the group on the ICON itself.

For the RT_GROUP_ICON process, modern Windows versions still use the algorithm used by Windows 95 (not that by Windows NT):

Windows NT simply chooses the first resource listed in the application’s RC script. On the other hand, Windows 95’s algorithm is to choose the alphabetically first named group icon if one exists. If one such group resource does not exist, Windows chooses the icon with the numerically lowest identifier.

For a Delphi application the icon shown must be named MAINICON, since the below source fragment has been in TApplication.Create(…) like forever:

FIcon.Handle := LoadIcon(MainInstance, 'MAINICON');

Which means that if you want the Windows Shell (usually Explorer) to select that one, all other icon resources in your executable must have names that sort after MAINICON.

Selecting the icon within a resource

For the individual icon, the process is more complex. Even the summary is. To summarise the summary to select an icon for the requested size:

  1. Prefer the image closest in size.
  2. When more images of that size are present, match on the best color depth for the display.
  3. When no color depth matches, prefer the image with the greatest color depth not exceeding the color depth of the display.
  4. When all exceed the color depth, prefer the lowest color depth.

For color depth, treat 8 or more bits per pixel as equal. So there is no advantage of including a 16×16 256-color image and a 16×16 16-color image in the same resource — the system will simply choose the first one it encounters. When the display is in 8-bpp mode, the system will choose a 16-color icon over a 256-color icon, and will display all icons using the system default palette.

I’m not completely confident how 32-bit precisely fits in this scheme. If someone knows, please let me know and I’ll include the information.

I usually take 32-bit color images here which are actually True Color 24-bit + alpha channel RGBA images.

What about requested size?

Actually there are a lot of sizes that Windows can request, and there are many articles about it, some of which contradict each other.

From what I assembled, these are the sizes you need to run on Windows XP / Server 2003 and up:

  • 16×16
  • 20×20
  • 24×24
  • 32×32
  • 40×40
  • 48×48
  • 64×64
  • 96×96
  • 128×128
  • 256×256 (for Windows XP / Server 2003: do not compress this size)

I might be wrong, so here are some links:

–jeroen

via:

Posted in .NET, Delphi, Development, Software Development, The Old New Thing, Windows Development | Leave a Comment »

Delphi 10 Seattle version numbers

Posted by jpluimers on 2015/12/22

The ones I know, hopefully they are the only ones as search results are inconclusive:

–jeroen

XE9

Posted in Delphi, Delphi 10 Seattle, Development, Software Development | 1 Comment »

Some links on DUnit test cases and test suites, XML and XSD

Posted by jpluimers on 2015/12/17

DUnit registration can mix TestSuites and TestCases.

Some links:

–jeroen

 

 

 

 

Posted in Agile, Delphi, Delphi 10 Seattle, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development, Unit Testing | Leave a Comment »