The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,342 other followers

Archive for the ‘Delphi’ Category

Delphi fun code: How to make a water effect on TImage or anything? (via: Stack Overflow)

Posted by jpluimers on 2014/10/21

Every once in a while you see a question with some great code in the answers.

This is such a time: image – How to make a water effect on TImage or anything? – Stack Overflow.

–jeroen

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

The Delphi MESSAGE directive: don’t forget quotes!

Posted by jpluimers on 2014/10/15

The Delphi MESSAGE directive is a very powerful one, you can generate compiler hints, warnings and errors with it, even fatal ones that abort compilation.
The compiler will return error codes H1054 (hint), W1054 (warning), E1054 (error) or F1054 (fatal error), which in the documentation are known under the catch-all x1054.

You need to take a bit of care with message directives, especially with the quotes. For instance

{$Message Error 'Not implemented'}

gives you the error below, but continues compiling:

[DCC Error] E1054 Not implemented

However, if you forget the single quotes

{$Message Error Not implemented}

it gives you error E1030  (not x1054), which is a bit confusing as it is a catch-all for invalid directives:

[DCC Error] E1030 Invalid compiler directive: 'message'

Here is a full example of all the message directives and compiler reactions you can get: Read the rest of this entry »

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »

Files in your Delphi settings directory; How to relocate the Favourites on your Welcome page

Posted by jpluimers on 2014/10/14

Delphi and 3rd party tools keep some of the settings in your %AppData% directory. Much more convenient than the registry as they are easier to read and modify when needed (also easier to damage <g>). We’ll start with an overview where various versions of Delphi store their configuration files, then show how the Favourites on the Welcome Page are stored, then end with an overview of BDS, Company Names and Product Names. Read the rest of this entry »

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, History, Software Development | 3 Comments »

Delphi: RandomizeIfNeeded

Posted by jpluimers on 2014/10/07

Calling Randomize too often can make your Random numbers even less random.

Sometimes having the Randomize call in a unit initialization section is not practical.

Hence this little method that I think I first wrote back in the Turbo Pascal days:

procedure RandomizeIfNeeded();
begin
  if RandSeed = 0 then 
    Randomize();
end;

–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 for PHP, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal | 7 Comments »

Delphi hinting directives: deprecated, experimental, library and platform

Posted by jpluimers on 2014/10/01

I’ve been experimenting with the Delphi hinting directives lately to make it easier to migrate some libraries to newer versions of Delphi and newer platforms.

Hinting directives (deprecated, experimental, library and platform) were – like the $MESSAGE directive – added to Delphi 6.

Up to Delphi 5 you didn’t have any means to declare code obsolete. You had to find clever ways around it.

Warnings for hinting directives

When referring to identifiers marked with a hinting directive, you can get various warning messages that depend on the kind of identifier: unit, or other symbol. Read the rest of this entry »

Posted in Apple Pascal, Borland Pascal, DEC Pascal, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Encoding, FreePascal, ISO-8859, ISO8859, Java, Lazarus, MQ Message Queueing/Queuing, Reflection, Software Development, Sybase, Unicode, UTF-8, UTF8 | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 1,342 other followers

%d bloggers like this: