Which physical file stores the main form name for a Delphi application?
e.g. MyApplication has a form MyForm which is set as the ‘Main form’ via Project options. Where is the information ‘Main Form = MyForm’ actually stored?
In the Delphi IDE the application ‘Main form’ is specified via the menu: Project | Options | Forms.
The obvious file would be the .bdsproj or the .dpr but there doesn’t seem to be anything in either of these that indicates which form is the ‘main’ one.
It’s in the project (.DPR) file. The first call to Application.CreateForm() with a form as a parameter identifies the application’s main form.
Note that a TDataModule doesn’t satisfy the above requirement; that’s actually useful, as you can autocreate a datamodule before your main form and then access that datamodule in the main form’s constructor.