A rather common question on StackOverflow, the Delphi newsgroups and elsewhere is how to display a drop down menu when the user presses a button. There are many proposed solutions and even something built into newer versions of Delphi (Which doesn't work for me for some reason.) Here is mine (which is based on this … Continue reading Showing a dropdown menu when clicking a button
I could not find anything like this so I wrote it myself: This class translates most Windows message ids into their symbolic name. type TWmMessageToString = class function MsgToString(const _WmMsg: Cardinal): string; overload; function MsgToString(const _Msg: TMessage): string; overload; end; The names are taken from Delphi 2010's messages.pas Delphi 2010's controls.pas Wine It seems pretty … Continue reading Translating Windows messages to strings
In an older blog post I wrote about AutoComplete for TEdits using SHAutoComplete. I just actually tried to use that function in one of my applications and found that there is a quite annoying problem with it: If you have set the OK button's Default property to true (so it gets "clicked" when you press … Continue reading Preventing a dialog from closing while autocomplete is active
Microsoft released a Windows Update this week that caused quite a problem for Delphi developers still using Delphi 2006 to 2010. When starting a second instance of the IDE they now get the error Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr The update in question is a security update for all supported Windows versions and has the number … Continue reading Sabotaged by Windows Update
We are using a bar code scanner to scan the serial numbers of all hard disk drives we buy. This is supposed to make it easier and less error prone to put them into an Excel list for tracking their whereabouts (we use quite a lot of drives for storing video data). Of course, when … Continue reading Using a bar code scanner? Watch out for your keyboard layout!
If you ever had to change the motherboard of your computer and wanted to keep the Windows installation on it, you might have encountered the dreaded Blue Screen of Death with an unhelpful error code. In my case, this was a Windows 7 installation where the on board SATA controller started to misbehave. These problems … Continue reading Windows 7 Blue Screen Of Death with error 0x7B