Delphi 8 Tips, Tricks and Speed Improvements
Speed is the Key
Delphi 8 has become a large product with a lot of features. For various reasons, some features are hidden, and only accessible via a registry modification. Other features are often not needed, and just make the IDE slower to start. Fortunately, with a few registry hacks, one can add a few new features, and disable others that they don’t use, making the IDE be exactly what the user wants.
Playing the Registry Game
First off, modifying the registry is dangerous, and can potentially cause problems on your system. I only recommend modifying the registry if you really understand what you are doing. Having said that, you should understand how Delphi 8 uses the registry. To start the Windows Registry Editor, run RegEdit.exe.
For Delphi 8, the IDE normally reads all of its registry settings from HKEY_CURRENT_USERSoftwareBorlandBDS2.0. Previous versions of Delphi used HKEY_CURRENT_USERSoftwareBorlandDelphi<Version>. C#Builder and Delphi 8 share the exact same IDE, so the executable was renamed to BDS.exe, standing for “Borland Developer Studio”. When the IDE starts, if the given registry key does not exist under HKEY_CURRENT_USER (HKCU), it will copy the contents of HKEY_LOCAL_MACHINE (HKLM) to the HKCU key. This allows the IDE to be used with multiple users.
Now, the IDE has a little known option that allows it to start with a different registry key. By using the command line option –rSomeString, where SomeString is any given registry key, the IDE will start using SomeString as its registry. For example, I have a shortcut to BDS.exe on my desktop with a Target of: "C:\Program FilesBorlandBDS2.0Binbds.exe" –rBareBones. When the IDE starts, it reads and writes to the registry key HKCUSofwareBorlandBareBones2.0. The first time you start the IDE this way, it will copy its settings over from HKLM.
What is the advantage of this –r registry switch? Well, it allows you to use the same IDE in different ways. By loading different packages with different registry keys, you can have one IDE tailored for just text editing, and another tailored for all available features.
Find Your Keys
Now that you know where to find the registry keys, it is time to take a look at how the IDE uses them. The IDE itself is very modular. Virtually all product features are simply plugged into the IDE via packages or assemblies. Native packages are loaded from the “Known IDE Packages” key. .NET assemblies are loaded from the “Known IDE Assemblies” key. Installed VCL .NET components are loaded from the “Known Assemblies” key.
One can speed up the start time of the IDE by disabling items that they don’t use. Start the IDE with the –rBareBones option in order to leave the current settings untouched. The easiest way to do this is to create a shortcut to BDS.exe and modify the target to contain –rBareBones. Start the IDE once (so it copies the keys over), and exit.
Image1.tif: Modifying a shortcut to BDS.exe with the –r option.
Now, in the Registry Editor, you should see something similar to Image 2:
Image2.tif: Registry Editor displaying the BareBones registry key.
Select the “Known IDE Packages” key and delete it. Repeat with “Known IDE Assemblies” and “Known Assemblies”. Start the IDE again with the shortcut you created earlier. It should start very fast (it is almost instant on my laptop)! What you now have is a very fast text editor, with syntax highlighting.
Being More Selective
Now, you probably still want to use certain features of Delphi, such as the ability to compile applications and do some basic form designing. To do this, you will have to disable individual packages.
Start the IDE again with a different –r option, such as –rBareDelphi, and exit. Refresh the Registry Editor and select the “Known IDE Packages” key under HKCUSoftwareBorlandBareDelphi2.0. You should again see something similar to Image2. Each item in the list is a particular feature for the IDE. For example, “$(BDS)Bindelphidotnetide71.bpl” is the core Delphi for .NET IDE personality. Disabling this package would disable the ability to compile Delphi applications.
Some items in the list have a descriptive description telling you what they are for. Others simply say “(Untitled)”. To find out what a package is for, browse to it with Windows Explorer, right click on it and select Properties. On the Version tab, look at the Description to see what the package does. For example, the package asmview71.bpl has a Description of “Assembly Viewer”. This package allows the IDE to open and browse assemblies inside of it.
Now the trick is to learn how to disable packages. It is actually quite simple; make the string value empty, and the package won’t load. Make the string value not empty, and it will load.
So, to make a “Bare Bones” version of Delphi, set all values to have a blank string except the following:
| Registry Entry | Package Description |
| $(BDS)Bindelphidotnetide71.bpl | Core Delphi for .NET IDE Personality |
| $(BDS)Bindotnetcoreide71.bpl | Core .NET IDE Personality |
| $(BDS)Bindotnetdebugide71.bpl | .NET Debugging Features |
| $(BDS)Binidefilefilters71.bpl | IDE File Filters – (Required) |
| $(BDS)Binvcldotnetdesignide71.bpl | VCL for .NET Personality Features |
In addition, if you want “Pro” Delphi features, don’t disable the packages with the word “pro” in them.
Now, when you start the IDE it should load a lot faster.
Making the IDE even faster
I also mentioned the “Known IDE Assemblies” registry key. This key is the .NET counterpart to “Known IDE Packages”. You can selectively disable assemblies in this list the same was as “Known IDE Packages”. I don’t recommend disabling $(BDS)BinBorland.Studio.Delphi.dll, as it adds core Delphi features to the product.
The last key to take a look at is “Known Assemblies”. Items in this list register components and/or component designers. If you don’t use a certain set of components, you can disable them by setting their string values to a blank string. If you don’t do VCL for .NET development, you can remove all items in the list.
Hidden features
Now for some cool hidden features in Delphi 8. You should have a registry key named HKCUSoftwareBorlandBDS2.0Globals. If you add a new String Value named PaletteNewItems containing a value of 1, the IDE will have the Palette Wizards feature in the Tool Palette, as seen in Image3. Palette Wizards are a quick and easy way to create any item found in the New Items Gallery.
Image 3: Palette Wizards in the Tool Palette
Another really cool hidden feature is Error Insight. In the Globals key, add another String Value named ShowMeProblemsCorbin containing a value of 1. When you type in the code editor, it will constantly update to show you small red squiggles when there is a syntax error. Holding the mouse over the squiggle will show why the error occurred.
Image 4: Error Insight in action
If for some reason Error Insight doesn’t show up, you may have to register the ToolsAPI type library. Do this with a command such as:
C:\Program FilesBorlandBDS2.0Bin>tregsvr -t -s Borland.Studio.ToolsAPI.tlb
Bringing It All Together
Now you should have the understanding on how to create a highly customized version of the IDE. I commonly find myself disabling features that I don’t often use. It is easiest to create multiple shortcuts to BDS.exe, each containing a different –r option to start the IDE with or without certain features. This gives me the greatest flexibility with one of the greatest products.
Share This | Email this page to a friend
Posted by Corbin Dunn on September 29th, 2004 under Uncategorized |

RSS Feed

September 29th, 2004 at 2:07 pm
Cool article, but didn’t you forget the images?
September 29th, 2004 at 2:07 pm
Yeah, i’m lazy
September 30th, 2004 at 12:42 am
The first time i run Delphi 8 with the -r option and a previously unused registry key the caption of Delphi 8 says Invalid Install. When I restart the app again the message is no longer there. Is there anything you could say about this?
September 30th, 2004 at 8:28 am
This is no big deal. It is just the caption of the IDE. It is controlled by the registry key under Personalities. It should be easy to figure out; just take a look at it.
October 19th, 2004 at 12:43 pm
I lost my camera’s cord! I guess i need to go to frys sometime soon…
October 25th, 2004 at 4:15 pm
<a href=http://www.secret-x.com/btits05/2294.html>adult galleries</a>
November 29th, 2004 at 5:00 am
If there is this -r switch for Delphi 2005, why there is no different shortcuts installed to start BDS with a single personality?
For example:
Delphi 2005 (Delphi Win32 Only)
Delphi 2005 (C# Only)
Delphi 2005 (Delphi.NET Only)
Most people work with a certain personality only and don’t need to overload already heavy IDE.
March 5th, 2005 at 12:29 am
Thanks, it was very interesting
April 20th, 2006 at 12:32 am
Nice reading
July 13th, 2006 at 3:18 am
None… One day everybody will know me all over the world.