Blog Archives

20 resources on (migrating to) Unicode with Delphi

Are you maintaining an application that has been around for more than 5, 6 years? Using a pre-Unicode Delphi version (pre D2009) to do so?

Would you like to switch to a newer Delphi version to gain the advantages of Unicode, generics, extended RTTI, 64 bit, the REST client library and other such niceties?

Read more ›




How to get the location of the user’s “My Documents” folder

Your application allows your users to create and save files. You help your users by remembering where the last file was stored they don’t have to navigate their entire folder structure every time they want to save a file.

So far so good.

First time experience

To make you application even better,

Read more ›




How to find all instantiated forms in your project at run time – Take two

Boy, do I feel stupid!

As David pointed out in the comments to take one of this subject, there is a much easier way to get all the instantiated forms at run time:

Forgot all about Screen.CustomForms existence. And it’s been there since at least D5…

Read more ›




How to find all instantiated forms in your project at run time

For reasons quite unfathomable by me, you would like to get your hands on a list of all forms in your project. [1]

But wait. Do you want this at design time? Or at run time?

Oh, at run time. Pfffew. Ok. I can do that.

Read more ›




How to get a ListView to display your values in columns

Can’t get a ListView to display the values from your database in columns properly?

You want to display information from your database. You would like it to be displayed in a list with columns. A ListView can do that.

Should be as easy as 1-2-3.

Just set up a query,

Read more ›




Why does my panel display the wrong color?

You are working on your application and want to add some color to spruce it up a bit. Setting colors using Delphi’s Object Inspector is a breeze. That is, when you use the predefined colors from the color property’s drop-down list.

Object Inspector Color Drop-Down

Or when you use the color dialog that opens when you double click the Object Inspector’s edit for the color property.

Read more ›




How to store enums without losing your coding freedom

Enums are nice!

You have found out about enumeration types and you clearly see the advantages they hold over plain, tired, old integers. They are specific, self documenting, type safe – you can’t pass one type of enum when another is expected. Oh yes, you love enums. And enum sets.

Read more ›




How to make your forms behave consistently without repeating yourself

You are in the Delphi IDE and need to make a new form. It looks like another form you already have, but not quite. You could copy and tweak it. That’s the quick way to get the result you need. That’s the way most of your predecessors have gone about creating new forms.

Read more ›




Show Buttons
Hide Buttons