Page 1 of 12
Undocumented Settings For Delphi, Kylix and C++Builder
l l l l l l l l l l l l l l
Modifying registry entries Automatic Component Palette Operations WYSIWYG font name in the Object Inspector Object Inspector property value colour IDE tooltip colour Code Insight errors No Debug Window Shortcuts CPU window Attach to Process Menu Editor default height/width Component Template directory Personal settings directory IDE internal command lines Keystroke macro toolbar in the editor
Modifying registry entries
To modify Delphi registry entries, launch a copy of RegEdit.Exe and navigate down through this path off the HKEY_CURRENT_USER root key: Software\Borland\Delphi\5.0, substituting the appropriate version number. In the various keys below the main Delphi root, you may need to add new keys, if the specified key does not exist. You may also have to create new values. Menu items off the Edit menu allow you to do both of these things. As an alternative to using the Registry Editor application, you could compile and run the helper application shown in Listing 1 which uses an .INI file (with the same name as the application, in the same directory) containing information about registry entries to change. Listing 1: A program to set registry settings with program RegTweak; uses Registry, IniFiles, SysUtils, Forms, Dialogs, Controls, Classes; type TDataType = (dtString, dtInteger, dtBool); var Reg: TRegistry; Ini: TIniFile; IniName, DataTypeStr, Entry: String; DataType: TDataType; Sections, Entries: TStrings; Loop1, Loop2: Integer; begin
IniName := Copy(IniName.Count .OpenKey(Sections[Loop1]. try if MessageDlg('Update registry with INI file settings?'.ExeName. for Loop1 := 0 to Sections. end end finally Reg. Length(IniName) .Create. One allows a page of the Component Palette to be selected by simply moving the mouse over the tab (you do not have to click it).htm
. Entries). True). 'S': DataType := dtString.Values[Entry])). //Open the key Reg.Count .
Automatic Component Palette Operations
There are a couple of undocumented registry entries that affect the Component Palette in Delphi 4 and later. 0) = mrOk then begin Ini.CloseKey end end end finally Sections.Values[Entry]). Entries := TStringList. dtBool: Reg.Values['Type'].Values[Entry]) = 'TRUE').WriteInteger(Entry. Ini := TIniFile. 'B': DataType := dtBool. Sections := TStringList.ReadSections(Sections). UpperCase(Entries. Note that this is not to do with the scrollers that scroll the tabs into view.Clear.Page 2 of 12
IniName := Application. Reg := TRegIniFile. DataType := dtString.Create.Create(IniName).Free end end. dtInteger: Reg. Entries.
http://www.1 do begin Entries.1 do begin Entry := Entries.Create.Names[Loop2]. mtConfirmation.WriteBool(Entry.WriteString(Entry.ReadSectionValues(Sections[Loop1]. try //Set each entry for Loop2 := 0 to Entries. mbCancel].com/Undocumented/RegistryEntries. The other one allows hidden components on a Component Palette page to be easily scrolled into view by moving the mouse over either the left or right palette scroller.3) + 'INI'.Free. if DataTypeStr <> '' then case UpCase(DataTypeStr) of 'I': DataType := dtInteger.Free. [mbOK.Free. Ini. Reg.blong. //Skip the data type entry if UpperCase(Entry) <> 'TYPE' then case DataType of dtString: Reg. StrToInt(Entries. 1. Entries. //Identify target registry entry type DataTypeStr := Entries. Ini. but the ones that appear on the Component Palette itself when there are more components than can be displayed. end.
any WYSIWYG view of all the available fonts will mean that all fonts would be loaded into. But. Alternatively. One visual property that does not give immediate feedback.com/Undocumented/RegistryEntries.0 Type=S FontNamePropertyDisplayFontNames=1 This entry only seems to work in Delphi 5. A suitable RegTweak. Listing 3: Making WYSIWYG Font properties [Software\Borland\Delphi\5. Of course registry entries can already be ably described with . potentially taking quite some time (and resources).INI file will also be used for all the other undocumented registry entries. The next time you start your copy of Delphi. This idea of showing a section from this .blong. if you want to see how it looks.0\Extras] . you can enable WYSIWYG font name display by adding the section in Listing 3 to the INI file from Listing 2.Ini file for the RegTweak application can be seen in Listing 2. This is because Windows installations have a tendency to include many.REG files.Delphi 4.0\Extras] .INI file. B for Boolean or I for Integer). These should be called AutoPaletteSelect and AutoPaletteScroll respectively. however is the Font property’s Name sub-property (each font name is shown in a fixed font).
http://www.INI file that will work with Listing 1 [Software\Borland\Delphi\5. The rest of the section contains the entries that should be added to the registry. the features will be enabled. many fonts.Page 3 of 12
In the Extras key off your Delphi version's root key you need to create two string values with Edit | New | String Value. To disable them. you could just add the key entry line from Listing 3 into the section in Listing 2 if you prefer. The type of all the entries in the section is indicated by the Type entry (this can be S for string. The registry path below HKEY_CURRENT_USER is specified as a section heading. however their layout is more difficult to read than this .0 and later Type=S AutoPaletteSelect=1 AutoPaletteScroll=1
WYSIWYG font name in the Object Inspector
Delphi 5 updated the Object Inspector so that it can give visual feedback on certain properties (such as Color. change the values to 0. As a consequence. Kylix and Delphi 6 ignore it. Cursor and ImageIndex).htm
. Listing 2: An . and should both be set to a value of 1.Delphi 5.
Delphi 6 supports customising all the colours used in the Object Inspector in the environment options dialog on the Object Inspector page.com/Undocumented/RegistryEntries. you can do so. Listing 4: Changing the property value colour in Delphi 1 [Globals] PropValueColor=clRed In 32-bit versions of the IDE.Delphi 2.0\Globals] . The entry is called PropValueColor and its value is a colour value. In Delphi 1 you must edit the Delphi.Ini file in the Windows directory. The Object Inspector shows property names in black and values in blue by default.0 and later Type=S PropValueColor=clRed
http://www. The setting goes in the Globals section. Listing 5: Changing the property value colour in 32-bit Delphi [Software\Borland\Delphi\5. you need to add this entry to the Globals registry key. so this setting is redundant from Delphi 6 onwards.Page 4 of 12
Object Inspector property value colour
This one works in all versions of the IDE up to Delphi 5.blong. This can be any constant that would work as a value in a Delphi program.INI file as shown in Listing 5. so both $0000FF and clRed would be acceptable (see Listing 4). The RegTweak program (Listing 1) can do this with a new section in its . which many not exist. If you want the property values to be displayed in another colour.htm
Many Windows users have desktop shortcuts set up. Code Insight will not do anything. However. Listing 8: Enabling the display of Code Insight compilation errors [Software\Borland\Delphi\5. To be made aware when these things happen.0\Compiling] . you may set up Microsoft Word to launch through Ctrl+Alt+W.Ini file section in Listing 8. but you would instead get Word popping up onscreen.Page 5 of 12
IDE tooltip colour
Delphi 1. Whilst it defaults to that dull yellow colour ($80FFFF in Delphi 1 or clInfoBk in 32-bit Delphi) you can change it with another entry in the Globals section.0 and 3.
http://www. you might press Ctrl+Alt+W for the watch window. or maybe in another source file. set the registry entry as described in the RegTweak.0 Type=S HintColor=clAqua
Code Insight errors
The message view (where compiler errors are displayed) normally shows errors only when you ask for an explicit compilation. every time the Code Parameters or Code Completion parts of Code Insight (from Delphi 3 onwards) kick in. Ctrl+Alt+W for View | Debug Windows | Watches. e.Ini file and Listing 7 shows what to add to RegTweak.0 and later Type=S ShowCodeInsiteErrors=1
No Debug Window Shortcuts
In Delphi 4 and later. Listing 6 shows the change to make to the Delphi.Delphi 2. they do background compilation to get the information they require to display.0\Globals] .com/Undocumented/RegistryEntries. If you have an error further up the source file you are in.g.htm
. which will default to also using Ctrl+Alt shortcuts. Additionally certain international characters are inserted using Ctrl+Alt shortcuts. In Delphi. You can therefore easily get ambiguity. as it will not have compiled enough information.blong. For example. 2 and 3 and C++Builder 1 all allow you to change the colour of the IDE tooltip.g. e. Listing 6: Changing the IDE tooltip colour in Delphi 1 [Globals] HintColor=clAqua Listing 7: Changing the IDE tooltip colour in Delphi 2 and 3 and C++Builder 1 [Software\Borland\Delphi\3.Delphi 3.Ini. the debug window options available under the View | Debug Windows all have shortcuts involving Ctrl+Alt.
as it features in the README. Ctrl+Alt+I and Ctrl+Alt+O give é. The RegTweak. Removing these shortcuts from the offset will avoid you getting erroneous applications launched instead of debug windows displayed.Page 6 of 12
Ctrl+Alt+E. However.Delphi 4. Listing 9: Disabling the Ctrl+Alt+letter shortcuts for the debug menu items [Software\Borland\Delphi\5.TXT file of Delphi 4 and later. strictly speaking this setting is not undocumented.com/Undocumented/RegistryEntries.0 and later Type=S NoCtrlAltKeys=1 With this setting the debug menu changes from this:
http://www.0\Editor\Options] .Ini section is shown in Listing 9.htm
.blong. í and ó respectively.
0 only Type=S Enable Attach Menu=1
Editor default height/width
When the IDE starts a new project. To make the View | CPU Window visible in Delphi 2 or 3. As usual. menu item will be visible the next time you start Delphi 4.Ini section shown in Listing 10.0 Type=S EnableCPU=1
Attach to Process Menu
Whilst C++Builder 4 and later and also Delphi 5 and later have a documented menu item for attaching to a running process (which frankly works best under Windows NT). but only after setting an undocumented registry entry. consisting solely of a disassembly view. or a global desktop in Delphi 5 or later) or by setting up a pair of registry entries in products earlier than Delphi 4.Ini is also shown in Listing 12.Delphi 2. However. Listing 10: Enabling the CPU window in Delphi 2 or 3 [Software\Borland\Delphi\3. but it existed in Delphi 2 and 3 as well. but a section from Delphi 1’s Delphi.0\Debugging] .0\Debugging] ...Ini can be found in Listing 13. it chooses a default editor width and height (unless a default desktop has been saved). With the entry (as described in Listing 11) enabled. you can do so either by setting up some kind of saved desktop (either a default project desktop.blong.com/Undocumented/RegistryEntries. a suitable section from RegTweak. Delphi 4 has the same menu item available.htm
. use the RegTweak. Listing 11: Enabling the Attach to Process menu item in Delphi 4 [Software\Borland\Delphi\4.Delphi 4. Listing 12: Setting a new default editor height and width for Delphi 1
http://www. If you want to specify a different default height and width for the editor.Page 7 of 12
A CPU window (with full machine disassembly and register views) was formally introduced in Delphi 4.0 and 3. the CPU window in Delphi 2 was very primitive. a Run | Attach to Process.
Delphi 4. In order for each person’s preferences to be maintained. Listing 15: Specifying a personal settings directory in Delphi 1 [Globals] PrivateDir=c:\Delphi\User1 Listing 16: Setting a personal settings directory in 32-bit Delphi [Software\Borland\Delphi\5.borland.blong. Kylix uses delphi.0\Globals]
http://www.0 and 3. you might want to locate the file on a network drive. whose name depends on the product and version you are using.Delphi 2. apart from Kylix. these files are in the corresponding product’s BIN directory. If you wanted to share one of these files among several developers. you can direct the IDE into locating the file where they are stored elsewhere. Listing 14: Specifying a new location for component templates [Software\Borland\Delphi\5. Component Templates are all stored in one file. Listing 14 shows a RegTweak. they can create a personal settings directory under the main Delphi directory.DCT. each person that used Delphi would update the single set of files in Delphi’s BIN directory.Ini section that will do it in Delphi 4 and later (Delphi 3 and C++Builder 3 endeavoured to support this feature but it was badly implemented and did not work).DCT.DCT.0 Type=S DefaultHeight=614 DefaultWidth=805
Component Template directory
If you are a big user of Component Templates (those reusable collections of components with custom properties and event handlers that were introduced in Delphi 3).htm
.dct. This setting is intended for use when Delphi or C++Builder is installed on a network and there is more than one person using it.0 and later Type=S CCLibDir=C:\Shared
Personal settings directory
The final setting in this section is the personal settings directory.Page 8 of 12
[Editor] DefaultHeight=614 DefaultWidth=805 Listing 13: Setting a new default editor height and width for 32-bit Delphi [Software\Borland\Delphi\3. but C++Builder 4 and later use C++Builder.DCT.0\Component Templates] .0\Editor] . C++Builder 3 uses BCB.com/Undocumented/RegistryEntries. Delphi 3 and 4 use Delphi32. Then the appropriate registry (or INI file) entry can be made to point towards this directory (see Listing 15 and Listing 16). or on a single machine with several people logging in and using it. By default. which stores it in ~/. Under normal circumstances. but Delphi 5 and later use Delphi.
.dsk delphi. much like Delphi 1.exe oh.ini bcb.0\User1 Each personal settings directory should have the appropriate files from Table 12 copied into it from the relevant product’s BIN directory.hdx defproj.blong. However. You can also get Component Templates stored in this directory with the previous registry entry described above.Delphi 2.Page 9 of 12
.com/Undocumented/RegistryEntries. The files will then be used from your private directory.cfg oh.dmt delphi32. Note that Kylix also supports this setting in its configuration file.dmt
Product Delphi 1 only Delphi 1 only Delphi 1 only Delphi 1 and 2 only Delphi 2 and later Delphi 2 and later Delphi 2 and later Delphi 3 and later Delphi 4 and later Delphi/C++Builder 4 and later Delphi/C++Builder 4 and later C++Builder 1 and later
Purpose Default project options for the IDE The file used to store menu templates The default project desktop file The MultiHelp index file Default project options for the IDE The file used to store menu templates The default project desktop file The text file used to store Code Templates Default project options for the command-line compiler The OpenHelp executable The OpenHelp settings file The file used to store menu templates
http://www.dmt delphi. since Kylix makes a personal directory for storing your settings in anyway (~/. if they exist (many of them won’t).borland).opt delphi. there is almost no point using it. Table 12: Files for the personal settings directory
File defproj.0 and later Type=S PrivateDir=C:\Delphi5.dsk delphi32.dci defproj.dof delphi32.
conf defproj.bpr ilink32.htm
.Page 10 of 12
bcb.dct delphi.blong.dll openhelp.dst
C++Builder 1 and later C++Builder 1 and later C++Builder 1 and later C++Builder 3 only C++Builder 3 only C++Builder 3 and later C++Builder 5 and later C++Builder 5 and later C++Builder 5 and later C++Builder 5 and later C++Builder 5 and later Kylix 1 and later Kylix 1 and later Kylix 1 and later Kylix 1 and later Kylix 1 and later Kylix 1 and later Kylix 1 and later Delphi/C++Builder 5 and later.desk delphi60dci delphi60dmt delphi60dro *.txt default.cnv defproj.com/Undocumented/RegistryEntries.bmk ibm1252.kof delphi.ini bcb.dci bcb.dsk default.exe openhelp.bcf convrtrs. Kylix 1 and later
The default project desktop file Default project file Incremental linker The OpenHelp executable The OpenHelp settings file The text file used to store Code Templates Editor formatting configuration file XML converter configuration Default application makefile Default library makefile XML converter Default project options for the command-line compiler Default project options for the IDE The Component Templates file The default project desktop file The text file used to store Code Templates The file used to store menu templates The Object Repository settings Global desktop files
In the Extras key off your Delphi version's root key you need to create a string values with Edit | New | String Value.
IDE internal command lines
You can ask C++Builder 5 and later to show you all the command-line options it uses when compiling each file and linking each project. Listing 17 shows a RegTweak.C++Builder 5. Listing 18: Enabling the keystroke macro toolbar in the editor [Software\Borland\Delphi\7.htm
.blong.0 and later Type=S ShowRecordMacro=1 The toolbar can be seen here:
http://www. Listing 17: Asking C++Builder to show options used for compiling/linking [Software\Borland\C++Builder\5. or of the editor options dialog in Delphi 5 and later. Also note that menu templates are available from the Menu Designer’s context menu. change the value to 0. This should be called ShowRecordMacro. However if you enable an undocumented registry value this status panel houses a toolbar that surfaces the keystroke macro recording/playback facility in the editor.0\Extras] .0\Compiling] . This particular registry entry is not strictly undocumented.Page 11 of 12
Note that Code Templates were introduced in Delphi 3 and are invoked by Ctrl+J They are edited on the Code Insight page of the environment options dialog in Delphi 3 and 4. Listing 18 shows a RegTweak. They allow you to insert common snippets of code straight into the editor from a popup list. The online help for the PrivateDirectory property also describes the setting. The comments preceding the TPropertyEditor class in the DsgnIntf.Ini section that does the job. and be given a value of 1. the toolbar will be displayed.pas unit describe this registry entry when explaining the PrivateDirectory property.Delphi 7. as it is mentioned in an Open Tools API source file.Ini section that does the job. To disable it. The next time you start Delphi. You can save common menu layouts and retrieve them when designing other menus. In normal usage this remains blank at all times.0 and later Type=S ShowCommandLine=1
Keystroke macro toolbar in the editor
In Delphi 7 there is a "spare" status panel in the code editor's status bar (the leftmost one).com/Undocumented/RegistryEntries.
.Page 12 of 12