“主要表格"在哪里?名称存储在Delphi中? [英] Where is the "Main form" name stored in Delphi?

查看:56
本文介绍了“主要表格"在哪里?名称存储在Delphi中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个物理文件存储Delphi应用程序的主要表单名称?

Which physical file stores the main form name for a Delphi application?

例如 MyApplication 的表单为 MyForm ,可通过Project选项设置为主表单".信息"Main Form = MyForm"实际存储在哪里?

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?

在Delphi IDE中,通过菜单指定应用程序"Main form": Project |选项|表格.

In the Delphi IDE the application "Main form" is specified via the menu: Project | Options | Forms.

显而易见的文件将是.bdsproj或.dpr,但是在这两个文件中似乎都没有任何内容表明哪种形式是主要"文件.

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.

推荐答案

它位于项目(.DPR)文件中.使用表单作为参数的对Application.CreateForm()的首次调用标识了应用程序的主表单.

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.

请注意,TDataModule不满足上述要求;这实际上很有用,因为您可以在主窗体之前自动创建一个数据模块,然后在主窗体的构造函数中访问该数据模块.

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.

这篇关于“主要表格"在哪里?名称存储在Delphi中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆