Delphi Snippets

By default, Delphi gets its date/time, currency and numeric format from Control Panel's International settings. We can set the constants defined in Delphi, like DecimalSeparator, ShortDateFormat and others like in the code below. To a complete list of these variables, look at Currency and date/time formatting variables in Delphi Help.

A short and simple code snippet using voice output with Delphi

02 December, 2012   

Delphi code example for HTML color to Delphi TColor

10 March, 2012   

Example Delphi code for Copying a screen

As the most important building block of any Delphi application, the TForm object is most of the times used as is. Delphi's TForm object provides enough properties and events to help you do (and control) whatever needed with it. Sometimes you'll find out that a few events or properties are missing... Try creating a simple form application. Now...

08 May, 2012   

Here shown an example for how to clone a Delphi Form

15 June, 2013   

Example shows here How to Clone a Delphi Form. Note: when you create a new clone from an existing form, the clone's OnCreate will not execute.

25 January, 2012   

Delphi Code example how to Cut, Copy and Paste

28 March, 2013   

Delphi code - Is running in terminal server

12 April, 2012   

Delphi code example - force the input in a TEdit

06 February, 2013   

Delphi code for Hexadecimal to Integer

Here's a simple trick to execute a Delphi object's method by name:

06 February, 2013   

Delphi code for String to Hexadecimal

Delphi's RTL ExpandUNCFilename function retrieves the full path and filename of a specified (relative) file using Universal Naming Convention for network files (thus making my *very old* custom function obsolete).

03 December, 2013   

Delphi code to return root drive path for drive with given number.

If you want to react on user maximizing or minimizing a Delphi form, use the code.

03 December, 2013   

Delphi code to return type of drive that contains the given (full) path.

Delphi code to display the screen size and the list of fonts

Delphi example code for Google Spreadsheet GEO code address

Delphi code example - how to Cut, Copy and Paste text from the control which has the focus.