Delphi

Delphi

Connecting Claude to Delphi

Prompt: Can I Claude Code build from command line via MSBuild and the analyze the ouptut of the Delphi compiler/msbuild? The compiler is located in c:\Delphi\Delphi 13\bin\dcc32.EXE but I would prefer to pas the dproj file to MsBuild. I think MsBuild is installed here: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe Answer: this requires the user to enable the WSL Interop […]

Connecting Claude to Delphi Read More »

A Delphi Fuzzy String Compare Algorithm

FuzzyStringCompare calculates an approximate similarity percentage between two strings. It uses a heuristic to count matching characters that are roughly in similar positions, allowing for a tolerance based on string lengths. The tolerance is about one-third of the longer string’s length plus the length difference. The algorithm greedily matches characters from the shorter string to

A Delphi Fuzzy String Compare Algorithm Read More »

FMX bug – Form has incorrect size after startup

I have this weird bug in Delphi 13 FMX where the height of the controls is not correct, at app startup. procedure TForm1.AfterConstruction; begin inherited AfterConstruction; MakeDemoBubble; end; TAutosizeBoxText (based on TRectangle) is parented in a ScrollBox. It is set to Align=Top. procedure TForm1.MakeDemoBubble; begin mmoUserResponse.Text := ‘WhatsApp-like text bubble. ‘ + #13#10+ ‘Cool and

FMX bug – Form has incorrect size after startup Read More »

Embarcadero Delphi CodeRage 2025 Summary [Day1] Free Code Agent: Build Faster Right in Your RAD Studio IDE

“Free Code Agent: Build Faster Right in Your RAD Studio IDE” Presented by Yai (CTO at Solutions, Embarcadero MVP)   Core Idea * AI Code Agents are tools that accelerate coding tasks by generating, refactoring, and scaffolding code inside your IDE. * They do not replace developers; they augment productivity. * Example used: Gemini CLI

Embarcadero Delphi CodeRage 2025 Summary [Day1] Free Code Agent: Build Faster Right in Your RAD Studio IDE Read More »

Why we can’t close a form that runs a tight FOR loop, even if we are using Application.ProcessMessages?

A stackOverflow user wanted to know why clicking on the form’s close button while some FOR loop is running does nothing: procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin for i := 0 to 9999999 do begin Memo1.Lines.Add(‘hi’); Application.ProcessMessages; end; end; The issue comes from the lack of understanding of how the forms work. Here is

Why we can’t close a form that runs a tight FOR loop, even if we are using Application.ProcessMessages? Read More »

How to highlight identifier under cursor in (any) Delphi IDE

If you place the cursor on an identifier (variable/function name/etc), CnPack will show you where that identifier is used in your code. Look for example how easy is to spot where the FBuffPos variable is used in the code below: Also, see how “dangerous” instructions (“Exit”) have been marked in blue! Note: On your Delphi

How to highlight identifier under cursor in (any) Delphi IDE Read More »

A vertically collapsible panel for Delphi (round up)

I was looking for a collapsible panel for many years.The most important feature I want from this control is to be able to collapse vertically. Here are the results of my research:   FoldingPanel (VCL) I used FoldingPanel v1.3  http://www.torry.net/authorsmore.php?id=2386 for years. It comes with nice chevron bitmap too. Advantage: The component comes as a

A vertically collapsible panel for Delphi (round up) Read More »

Can’t load package xyz.bpl. %1 is not a valid Win32 application – BPL dependency failure

Locating BPL dependency failure   In one instance my package required another package, but its BPL was not present. The error I got was “Can’t load package xyz.bpl. %1 is not a valid Win32 application”. I used the Dependency scanner feature from ‘PE Explorer’ ( www.heaventools.de ) to detect this. There was supposed to be

Can’t load package xyz.bpl. %1 is not a valid Win32 application – BPL dependency failure Read More »

Amsterdam Delphi Summit 2025 (A call to arms for bringing in “fresh blood”)

I was undecided if I should attend to this conference or not because I didn’t had enough information about the previous one. So, here is my 2.5 cents. A Journey by Bicycle Setting off in early June from Denmark on two wheels, I pedaled a few hundred km for the Delphi summit.The northern weather delivered

Amsterdam Delphi Summit 2025 (A call to arms for bringing in “fresh blood”) Read More »

Under FMX, TComponent.Visible effects also the design time!

In FMX, unlike the VCL, the Visible property affects both design time and runtime when set in the Object Inspector. That’s why setting Visible:= False in FMX hides components in the Form Designer, which is a big inconvenience. If you edit the form at design time often, you can keep Visible:= True in the designer

Under FMX, TComponent.Visible effects also the design time! Read More »

Connecting Delphi 12 to Gemini AI

Generate your key here https://aistudio.google.com/app/apikey and enter it into the IDE. As URL enter: https://generativelanguage.googleapis.com/v1   Parameters Top-P [official documentation] Top-P changes how the model selects tokens for output. Tokens are selected from the most (see top-K) to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A,

Connecting Delphi 12 to Gemini AI Read More »

New in Delphi Athene (12.0)

IDE Removed deprecated features: VCL Translation Support & Modeling Object Inspector – New string list editor Multiline string Editor Multiline string literals The Find in Files dialog now has a new Subdirectory exclude mask option, which excludes specific folders from being searched when using the Search in directories and Include subdirectories There are default exclusions

New in Delphi Athene (12.0) Read More »

New in Delphi Sydney (10.4)

10.4 Styles are finally working! Better support for high DPI monitors. High DPI support in styles (skins) Per Control Styling Better cross platform support Custom managed records – records now support custom initialization, finalization, and copy operations. Developers can customize how records get created, copied, and destroyed, by writing the code to be executed at

New in Delphi Sydney (10.4) Read More »

New in Delphi Rio (10.3)

Dark-light themes for IDE The IDE includes some of Andreas Hausladen’s “IDE Fix Pack” fixes and improvements (FINALLY!) High resolution timer caused by using Virtual Treeview. Findhinstance optimisations. Debugger using CREATE_DEFAULT_ERROR_MODE when creating the process. Tstringlist indexof and Name optimizations. High DPI Image List Support. Can fully support multi-resolution, pixel perfect images on all controls,

New in Delphi Rio (10.3) Read More »

New in Delphi Seattle (10.0)

New custom VCL controls corresponding to some new Windows 10 UI controls, which can also be used on previous version of Windows. New VCL controls: TActivityindicator, TSearchbox, TRelativePanel, TToggleSwitch, TSplitview Modern looking SelectDirectory function Support for Windows 10 Notifications using the notificationcenter component Box2D physics engine. Object Pascal interfaces for the Box2D physics engine Support

New in Delphi Seattle (10.0) Read More »

New in Delphi 12 – GetLinesEnumerator for reading text files line by line

GetLinesEnumerator – New enumerators for reading file content Returns the line-by-line enumerator without loading full file content into the memory. Memory Efficiency: TFile.GetLinesEnumerator reads the file line by line, which is memory-efficient for large files. Unlike TFile.ReadLines (which loads all lines into a list), this method streams the file incrementally. I test it with both

New in Delphi 12 – GetLinesEnumerator for reading text files line by line Read More »

My odyssey in the world of bioinformatics, with Delphi

After a conversation about the low popularity of the Delphi language—further worsened by the lack of libraries for Delphi—I decided to share my odyssey in the world of bioinformatics, using Delphi as my primary development tool.   My toy tool that turned into a commercial product Back in 2007, I wrote a small tool for

My odyssey in the world of bioinformatics, with Delphi Read More »

Say no to crappy images in your Delphi programs. Finding the best resizing algorithm.

So, because I built a program that has to resize/scale images up and down, I built this tool to test 13 resizing algorithms for Delphi. Tested algorithms Tests: Two of the above tests include 3rd party algorithms.If you don’t have access to their source code, you will have to switch off the {$3RDPARTY} switch.  

Say no to crappy images in your Delphi programs. Finding the best resizing algorithm. Read More »

Scroll to Top