I have just updated my last blog post regarding another effect of the Screen object caching the monitor configuration: Displaying a hint (via standard Delphi VCL functionality) causes an access violation. The solution is again to access the form's monitor property. Unfortunately, it's not that simple, as there is no user action that causes the … Continue reading When showing a hint causes an Access Violation
Category: Delphi
When Screen.Monitor[x].WorkAreaRect contains garbage
I'm posting this here so I can look it up later in case I forget it again: Some Delphi versions (I know about Delphi 2007 and earlier, not sure when it was fixed) have got a bug in the VCL code for the TScreen (global Screen object) when the monitor configuration changes. That class caches … Continue reading When Screen.Monitor[x].WorkAreaRect contains garbage
TdzSpeedBitBtn updated to support scaling
4 years ago I wrote a helper class TdzSpeedBitBtn which turns a TBitBtn into a TSpeedButton that can have the focus. That helper class has also been used in GExperts (in the Uses Clause Manager and Rename Components). It worked fine until Delphi 11 introduced per monitor DPI awareness. Then it still worked but the … Continue reading TdzSpeedBitBtn updated to support scaling
Why renaming a running executable can fail
I always thought that it is not possible to rename an executable that is currently running. Turns out I was wrong (happened before). It works fine for many executables, but not for all of them. In particular it does not work for the executables of our internal tools. Windows complains that the file is in … Continue reading Why renaming a running executable can fail
What does the following Delphi function do?
Still playing around with ChatGPT, I asked it "What does the following Delphi function do?" [delphi] function FileSizeToHumanReadableString(_FileSize: Int64): string; begin if _FileSize > 5 * OneExbiByte then Result := Format(_('%.2f EiB'), [_FileSize / OneExbiByte]) else if _FileSize > 5 * OnePebiByte then Result := Format(_('%.2f PiB'), [_FileSize / OnePebiByte]) else if _FileSize > 5 … Continue reading What does the following Delphi function do?
I asked ChatGPT what’s wrong with the following Delphi code
Slashdot just posted "What Happens When ChatGPT Can Find Bugs in Computer Code?" which links a PC Mag article with the title "Watch Out, Software Engineers: ChatGPT Is Now Finding, Fixing Bugs in Code" So I asked ChatGPT "What's wrong with the following Delphi code:" [delphi] function IsoStringToDateTime(const ISODateTime: string): TDateTime; const ISOShortLen = 19; … Continue reading I asked ChatGPT what’s wrong with the following Delphi code
New Edit Path expert in GExperts
It has been in the source code for quite a while and some few people and I have tested it, but I didn't tell anybody else about it: There is a new expert in GExperts for editing the current project's unit search path. It looks like this: It offers the same functionality as the Search … Continue reading New Edit Path expert in GExperts
Need help testing a GExperts bugfix
I have just applied patches that are supposed to fix some Unicode issues with Russian characters. These apply to the following editor experts: Expand Macro Template Locate / Move to matching delimiter Previous / Next Identifier reference My tests so far have shown no changes on how these work on my source code, but I … Continue reading Need help testing a GExperts bugfix
Minor Delphi Ide Explorer enhancement
I just added some minor enhancements to my Delphi Ide Explorer expert: For TShortCut properties it now also displays the text representation for the shortcut. For TShortCutList properties (TAction.SecondaryHotkeys) it now displays "<no shortcut>" if the list is emtpy rather than an empty string For TStrings properties it now displays "<empty>" if the list is … Continue reading Minor Delphi Ide Explorer enhancement
chat.openapi.com is really amazing
Since everybody and his brother is talking about the new chat engine from openapi I had to try it myself, and lo and behold it is amazing. I asked it about various topics and the answers I got were at least plausible. Being a Delphi developer I of course ended up asking it questions about … Continue reading chat.openapi.com is really amazing