0% found this document useful (0 votes)
419 views12 pages

Kylix Registry Settings Guide

This document discusses several undocumented settings that can be modified in the registry to customize the behavior and appearance of Delphi, Kylix and C++Builder integrated development environments. It describes registry entries that affect component palette selection, font rendering in the object inspector, tooltip colors, displaying errors from code insight features, and enabling shortcuts for the debug window. To make these changes, values need to be added or modified in the registry keys under HKEY_CURRENT_USER related to the IDE using a registry editor or a sample registry modification program provided.

Uploaded by

Yacine Souilah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
419 views12 pages

Kylix Registry Settings Guide

This document discusses several undocumented settings that can be modified in the registry to customize the behavior and appearance of Delphi, Kylix and C++Builder integrated development environments. It describes registry entries that affect component palette selection, font rendering in the object inspector, tooltip colors, displaying errors from code insight features, and enabling shortcuts for the debug window. To make these changes, values need to be added or modified in the registry keys under HKEY_CURRENT_USER related to the IDE using a registry editor or a sample registry modification program provided.

Uploaded by

Yacine Souilah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Page 1 of 12

Undocumented Settings For


Delphi, Kylix and C++Builder
l Modifying registry entries
l Automatic Component Palette Operations
l WYSIWYG font name in the Object Inspector
l Object Inspector property value colour
l IDE tooltip colour
l Code Insight errors
l No Debug Window Shortcuts
l CPU window
l Attach to Process Menu
l Editor default height/width
l Component Template directory
l Personal settings directory
l IDE internal command lines
l Keystroke macro toolbar in the editor

Modifying registry entries

To modify Delphi registry entries, launch a copy of [Link] 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

[Link] 8/02/2004
Page 2 of 12

IniName := [Link];
IniName := Copy(IniName, 1, Length(IniName) - 3) + 'INI';
Ini := [Link](IniName);
Sections := [Link];
Entries := [Link];
Reg := [Link];
try
if MessageDlg('Update registry with INI file settings?',
mtConfirmation, [mbOK, mbCancel], 0) = mrOk then
begin
[Link](Sections);
for Loop1 := 0 to [Link] - 1 do
begin
[Link];
[Link](Sections[Loop1], Entries);
//Identify target registry entry type
DataTypeStr := [Link]['Type'];
DataType := dtString;
if DataTypeStr <> '' then
case UpCase(DataTypeStr[1]) of
'I': DataType := dtInteger;
'B': DataType := dtBool;
'S': DataType := dtString;
end;
//Open the key
[Link](Sections[Loop1], True);
try
//Set each entry
for Loop2 := 0 to [Link] - 1 do
begin
Entry := [Link][Loop2];
//Skip the data type entry
if UpperCase(Entry) <> 'TYPE' then
case DataType of
dtString: [Link](Entry, [Link][Entry]);
dtInteger: [Link](Entry,
StrToInt([Link][Entry]));
dtBool: [Link](Entry,
UpperCase([Link][Entry]) = 'TRUE');
end
end
finally
[Link]
end
end
end
finally
[Link];
[Link];
[Link];
[Link]
end
end.

Automatic Component Palette Operations

There are a couple of undocumented registry entries that affect the Component Palette in
Delphi 4 and later.

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). 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. Note that this is not to do with the scrollers that scroll the
tabs into view, but the ones that appear on the Component Palette itself when there are
more components than can be displayed.

[Link] 8/02/2004
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. These should be called AutoPaletteSelect and
AutoPaletteScroll respectively, and should both be set to a value of 1. The next time you
start your copy of Delphi, the features will be enabled. To disable them, change the values
to 0.

A suitable [Link] file for the RegTweak application can be seen in Listing 2. The
registry path below HKEY_CURRENT_USER is specified as a section heading. The type of all the
entries in the section is indicated by the Type entry (this can be S for string, B for Boolean
or I for Integer). The rest of the section contains the entries that should be added to the
registry.

This idea of showing a section from this .INI file will also be used for all the other
undocumented registry entries. Of course registry entries can already be ably described
with .REG files, however their layout is more difficult to read than this .INI file.

Listing 2: An .INI file that will work with Listing 1

[Software\Borland\Delphi\5.0\Extras]
;Delphi 4.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, Cursor and ImageIndex).

One visual property that does not give immediate feedback, however is the Font property’s
Name sub-property (each font name is shown in a fixed font). This is because Windows
installations have a tendency to include many, many fonts. As a consequence, any
WYSIWYG view of all the available fonts will mean that all fonts would be loaded into,
potentially taking quite some time (and resources).

But, if you want to see how it looks, you can enable WYSIWYG font name display by adding
the section in Listing 3 to the INI file from Listing 2. Alternatively, you could just add the
key entry line from Listing 3 into the section in Listing 2 if you prefer.

Listing 3: Making WYSIWYG Font properties

[Software\Borland\Delphi\5.0\Extras]
;Delphi 5.0
Type=S
FontNamePropertyDisplayFontNames=1

This entry only seems to work in Delphi 5. Kylix and Delphi 6 ignore it.

[Link] 8/02/2004
Page 4 of 12

Object Inspector property value colour

This one works in all versions of the IDE up to Delphi 5. The Object Inspector shows
property names in black and values in blue by default. If you want the property values to
be displayed in another colour, you can do so.

In Delphi 1 you must edit the [Link] file in the Windows directory. The setting goes in
the Globals section, which many not exist. The entry is called PropValueColor and its value
is a colour value. This can be any constant that would work as a value in a Delphi program,
so both $0000FF and clRed would be acceptable (see Listing 4).

Delphi 6 supports customising all the colours used in the Object Inspector in the
environment options dialog on the Object Inspector page, so this setting is redundant from
Delphi 6 onwards.

Listing 4: Changing the property value colour in Delphi 1

[Globals]
PropValueColor=clRed

In 32-bit versions of the IDE, you need to add this entry to the Globals registry key. The
RegTweak program (Listing 1) can do this with a new section in its .INI file as shown in
Listing 5.

Listing 5: Changing the property value colour in 32-bit Delphi

[Software\Borland\Delphi\5.0\Globals]
;Delphi 2.0 and later
Type=S
PropValueColor=clRed

[Link] 8/02/2004
Page 5 of 12

IDE tooltip colour

Delphi 1, 2 and 3 and C++Builder 1 all allow you to change the colour of the IDE tooltip.
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. Listing 6 shows the
change to make to the [Link] file and Listing 7 shows what to add to [Link].

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.0\Globals]
;Delphi 2.0 and 3.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. However, every time the Code Parameters or Code
Completion parts of Code Insight (from Delphi 3 onwards) kick in, they do background
compilation to get the information they require to display.

If you have an error further up the source file you are in, or maybe in another source file,
Code Insight will not do anything, as it will not have compiled enough information. To be
made aware when these things happen, set the registry entry as described in the
[Link] file section in Listing 8.

Listing 8: Enabling the display of Code Insight compilation errors

[Software\Borland\Delphi\5.0\Compiling]
;Delphi 3.0 and later
Type=S
ShowCodeInsiteErrors=1

No Debug Window Shortcuts

In Delphi 4 and later, the debug window options available under the View | Debug Windows
all have shortcuts involving Ctrl+Alt, e.g. Ctrl+Alt+W for View | Debug Windows | Watches.

Many Windows users have desktop shortcuts set up, which will default to also using Ctrl+Alt
shortcuts. You can therefore easily get ambiguity. For example, you may set up Microsoft
Word to launch through Ctrl+Alt+W. In Delphi, you might press Ctrl+Alt+W for the watch
window, but you would instead get Word popping up onscreen.

Additionally certain international characters are inserted using Ctrl+Alt shortcuts, e.g.

[Link] 8/02/2004
Page 6 of 12

Ctrl+Alt+E, Ctrl+Alt+I and Ctrl+Alt+O give é, í and ó respectively. Removing these


shortcuts from the offset will avoid you getting erroneous applications launched instead of
debug windows displayed.

The [Link] section is shown in Listing 9. However, strictly speaking this setting is
not undocumented, as it features in the [Link] file of Delphi 4 and later.

Listing 9: Disabling the Ctrl+Alt+letter shortcuts for the debug menu items

[Software\Borland\Delphi\5.0\Editor\Options]
;Delphi 4.0 and later
Type=S
NoCtrlAltKeys=1

With this setting the debug menu changes from this:

to this:

[Link] 8/02/2004
Page 7 of 12

CPU window

A CPU window (with full machine disassembly and register views) was formally introduced
in Delphi 4, but it existed in Delphi 2 and 3 as well. However, the CPU window in Delphi 2
was very primitive, consisting solely of a disassembly view.

To make the View | CPU Window visible in Delphi 2 or 3, use the [Link] section
shown in Listing 10.

Listing 10: Enabling the CPU window in Delphi 2 or 3

[Software\Borland\Delphi\3.0\Debugging]
;Delphi 2.0 and 3.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), Delphi 4
has the same menu item available, but only after setting an undocumented registry entry.

With the entry (as described in Listing 11) enabled, a Run | Attach to Process... menu item
will be visible the next time you start Delphi 4.

Listing 11: Enabling the Attach to Process menu item in Delphi 4

[Software\Borland\Delphi\4.0\Debugging]
;Delphi 4.0 only
Type=S
Enable Attach Menu=1

Editor default height/width

When the IDE starts a new project, it chooses a default editor width and height (unless a
default desktop has been saved). If you want to specify a different default height and width
for the editor, you can do so either by setting up some kind of saved desktop (either a
default project desktop, or a global desktop in Delphi 5 or later) or by setting up a pair of
registry entries in products earlier than Delphi 4.

As usual, a suitable section from [Link] can be found in Listing 13, but a section
from Delphi 1’s [Link] is also shown in Listing 12.

Listing 12: Setting a new default editor height and width for Delphi 1

[Link] 8/02/2004
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.0\Editor]
;Delphi 2.0 and 3.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), you can direct
the IDE into locating the file where they are stored elsewhere.

Component Templates are all stored in one file, whose name depends on the product and
version you are using. Delphi 3 and 4 use [Link], but Delphi 5 and later use
[Link]. C++Builder 3 uses [Link], but C++Builder 4 and later use
C++[Link]. Kylix uses [Link].

By default, these files are in the corresponding product’s BIN directory, apart from Kylix,
which stores it in ~/.borland. If you wanted to share one of these files among several
developers, you might want to locate the file on a network drive. Listing 14 shows a
[Link] 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).

Listing 14: Specifying a new location for component templates

[Software\Borland\Delphi\5.0\Component Templates]
;Delphi 4.0 and later
Type=S
CCLibDir=C:\Shared

Personal settings directory

The final setting in this section is the personal settings directory. 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, or on a single machine with several people logging in and using it.

Under normal circumstances, each person that used Delphi would update the single set of
files in Delphi’s BIN directory. In order for each person’s preferences to be maintained,
they can create a personal settings directory under the main Delphi directory.

Then the appropriate registry (or INI file) entry can be made to point towards this directory
(see Listing 15 and Listing 16).

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.0\Globals]

[Link] 8/02/2004
Page 9 of 12

;Delphi 2.0 and later


Type=S
PrivateDir=C:\Delphi5.0\User1

Each personal settings directory should have the appropriate files from Table 12 copied into
it from the relevant product’s BIN directory, if they exist (many of them won’t). The files
will then be used from your private directory. You can also get Component Templates
stored in this directory with the previous registry entry described above.

Note that Kylix also supports this setting in its configuration file, much like Delphi 1.
However, there is almost no point using it, since Kylix makes a personal directory for
storing your settings in anyway (~/.borland).

Table 12: Files for the personal settings directory

File Product Purpose

Default project options for


[Link] Delphi 1 only
the IDE

The file used to store menu


[Link] Delphi 1 only
templates

The default project desktop


[Link] Delphi 1 only
file

[Link] Delphi 1 and 2 only The MultiHelp index file

Default project options for


[Link] Delphi 2 and later
the IDE

The file used to store menu


[Link] Delphi 2 and later
templates

The default project desktop


[Link] Delphi 2 and later
file

The text file used to store


[Link] Delphi 3 and later
Code Templates

Default project options for


[Link] Delphi 4 and later
the command-line compiler

Delphi/C++Builder 4 and
[Link] The OpenHelp executable
later

Delphi/C++Builder 4 and
[Link] The OpenHelp settings file
later

The file used to store menu


[Link] C++Builder 1 and later
templates

[Link] 8/02/2004
Page 10 of 12

The default project desktop


[Link] C++Builder 1 and later
file

[Link] C++Builder 1 and later Default project file

[Link] C++Builder 1 and later Incremental linker

[Link] C++Builder 3 only The OpenHelp executable

[Link] C++Builder 3 only The OpenHelp settings file

The text file used to store


[Link] C++Builder 3 and later
Code Templates

Editor formatting
[Link] C++Builder 5 and later
configuration file

XML converter
[Link] C++Builder 5 and later
configuration

Default application
[Link] C++Builder 5 and later
makefile

[Link] C++Builder 5 and later Default library makefile

ibm-
C++Builder 5 and later XML converter
[Link]

Default project options for


[Link] Kylix 1 and later
the command-line compiler

Default project options for


[Link] Kylix 1 and later
the IDE

The Component Templates


[Link] Kylix 1 and later
file

The default project desktop


[Link] Kylix 1 and later
file

The text file used to store


delphi60dci Kylix 1 and later
Code Templates

The file used to store menu


delphi60dmt Kylix 1 and later
templates

The Object Repository


delphi60dro Kylix 1 and later
settings

Delphi/C++Builder 5 and
*.dst Global desktop files
later, Kylix 1 and later

[Link] 8/02/2004
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, or of
the editor options dialog in Delphi 5 and later. They allow you to insert common snippets of
code straight into the editor from a popup list.

Also note that menu templates are available from the Menu Designer’s context menu. You
can save common menu layouts and retrieve them when designing other menus.

This particular registry entry is not strictly undocumented, as it is mentioned in an Open


Tools API source file. The comments preceding the TPropertyEditor class in the [Link]
unit describe this registry entry when explaining the PrivateDirectory property. The online
help for the PrivateDirectory property also describes the setting.

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 [Link] section that
does the job.

Listing 17: Asking C++Builder to show options used for compiling/linking

[Software\Borland\C++Builder\5.0\Compiling]
;C++Builder 5.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).
In normal usage this remains blank at all times. 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.

In the Extras key off your Delphi version's root key you need to create a string values with
Edit | New | String Value. This should be called ShowRecordMacro, and be given a value
of 1. The next time you start Delphi, the toolbar will be displayed. To disable it, change the
value to 0. Listing 18 shows a [Link] section that does the job.

Listing 18: Enabling the keystroke macro toolbar in the editor

[Software\Borland\Delphi\7.0\Extras]
;Delphi 7.0 and later
Type=S
ShowRecordMacro=1

The toolbar can be seen here:

[Link] 8/02/2004
Page 12 of 12

[Link] 8/02/2004

You might also like