AI;DR: This blog post was written using AI, as were the changes to the source code it describes. If you don’t want to read “AI slop”, better move on.
For everybody else: I proof read the blog post and it does not contain any hallucinations. I also checked the code changes, wrote the demo programs and tested them myself. No hallucinations either.
The Delphi IDE Explorer has always been an IDE plugin – you install it as a design-time package and it lets you inspect the running IDE’s components. But the core functionality has nothing IDE-specific about it. It uses standard VCL Screen.Forms and TypInfo RTTI, not the Open Tools API.
So with a small change, the same component explorer – including the recently added property editing – now works in any Delphi application.
How it works
Out of 14 source units, only two depend on the ToolsAPI: dzIdeExplorerExpert.pas (wizard registration, menu injection, splash screen) and dzIdeExplorerReg.pas (RegisterPackageWizard). Everything else – the main form, property editor, filter dialog, search, menu tree viewer – is plain VCL code.
A new conditional define dzStandalone controls the few differences:
{$IFDEF dzStandalone}
Caption := 'Component Explorer';
{$ENDIF}
// ...
{$IFDEF dzStandalone}
DelphiRoot := Items.AddChild(nil, Application.Title);
{$ELSE}
DelphiRoot := Items.AddChild(nil, 'Delphi IDE');
{$ENDIF}
A class procedure ShowExplorer provides the entry point for standalone use, using the same singleton pattern as the IDE expert.
Since the default (no define) is IDE expert mode, all existing package files and project settings remain unchanged.
Using it in your application
- Add the 12 shared source units from
src/to your project or search path. ExcludedzIdeExplorerExpert.pasanddzIdeExplorerReg.pas. - Define
dzStandalonein your project’s conditional defines (Project Options – Delphi Compiler – Conditional defines). - Call
Tf_dzIdeExplorerMain.ShowExplorerfrom wherever you like – a menu item, a button, a keyboard shortcut.
uses dzIdeExplorerMainForm; procedure TMainForm.miExplorerClick(Sender: TObject); begin Tf_dzIdeExplorerMain.ShowExplorer; end;
The explorer opens showing your application’s own forms and components. You can browse the component hierarchy, inspect properties and events, and edit property values at runtime – the same functionality as in the IDE, now available for debugging and experimenting with your own applications.
The explorer window even stays usable while your application is showing a modal dialog. Normally, opening a modal dialog disables all other windows in the application via WM_ENABLE. The explorer intercepts this message and re-enables itself, so you can inspect the modal dialog’s components and edit their properties while it is open.
Demo projects
The repository now includes a StandAloneTest/ directory with demo projects for Delphi 7, Delphi 2007, and Delphi 13. These are minimal VCL applications with a button that opens the component explorer.
Discussion about this in the corresponding post in the international Delphi Praxis forum.