Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I restore the default unit and form names to "Unit1" and "Form1" instead of higher numbers?

Tags:

delphi

When I select "File->New->VCL Forms Application - Delphi for Win32" I get auto-generated unit and form with names "unit1.pas" and "Form1" respectively.

But one day my Delphi crashed, and now when I press "VCL Forms Application" to create new project, it generates unit and form with names "unit2.pas" and "Form2".

How can I fix it?

Incidentally, I installed, in front of new, older version of Delphi (so I can build applications for Win98). When I created a new project, I got the same results: "unit2.pas" and "Form2" auto-generated names.

So I think that the index for generating names is stored somewhere globally, independently of the Delphi version. I tried to find that index in the Windows registry: (HKCU / HKLM)\Software\(Borland / CodeGear / Embarcadero) and in folders "C:\Program Files\Common Files" "Borland Shared" and "CodeGear Shared". So far without success.

like image 837
djucius Avatar asked May 27 '11 08:05

djucius


2 Answers

the number of the auto-generated unit and form names in not stored , is calculated based in the content of the RAD Studio\Project, you can change this folder from the IDE in the Tools/Options -> Environment Options -> Default project folder.

like image 70
RRUZ Avatar answered Oct 13 '22 01:10

RRUZ


Look at your Documents\RAD Studio\Projects folder. I think new form and unit name is prepared automatically according to the last unit name in that folder.

like image 30
SimaWB Avatar answered Oct 13 '22 00:10

SimaWB