Главная страница | назад





Article #26668: How to set the default form font in Delphi.

Question:

How can I set the default form font in Delphi?

Answer:

The value for the default font is stored in the registry. Open the registry editor by entering regedit at the RUN prompt. Go to the key

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0

Here you will add a new key called FormDesign (with no space). To do right click on the 5.0 and chose New | Key. Name the key FormDesign. Now right click on this new key and choose New | String Value. Name this string value DefaultFont (no space). Now right click on this new string value entry in the right window and choose Modify. Enter the name of the default font you would like, followed by a comma and the default size. For example:
  Arial,10
Now the next time you open Delphi this should be the default font for your forms. You can even go a little further with this if you wish by adding other font properties such as

  Arial,10, bold, italic

Last Modified: 19-JAN-01