[英]OnCreate event not fired in RAD Studio XE2 FireMonkey HD App?
I have Created a Fire Monkey HD app in RAD Studio XE2 and have created OnCreate event of TForm1 but it is not fired when I run my project.I could not find Events of my form in object inspector to bind OnCreate as it is in delphi 7.Please help.. 我在RAD Studio XE2中创建了一个Fire Monkey HD应用程序并创建了TForm1的OnCreate事件,但是当我运行我的项目时它没有被触发。我在对象检查器中找不到我的表单事件来绑定OnCreate,因为它在delphi 7中。请帮忙..
procedure TForm1.FormCreate(Sender: TObject);
begin
//some code...
end;
The handler will run so long as it is bound to the event. 只要绑定到事件,处理程序就会运行。
You say that you haven't found the place to bind the events. 你说你没有找到绑定事件的地方。 That clearly is the problem.
这显然是问题所在。 It's still done in the Object Inspector.
它仍然在Object Inspector中完成。 Open that up from the View menu, or press F11.
从“视图”菜单中打开它,或按F11。 Click on the surface of the form.
单击表单的表面。 Select the second page of the Object Inspector, called Events.
选择Object Inspector的第二页,称为Events。 And there you can relate events to handlers just as you are used to in Delphi 7.
在那里,您可以将事件与处理程序相关联,就像您在Delphi 7中一样。
If you cannot get the Object Inspector to show form events when the form design surface is selected, then you have a configuration problem with your Delphi installation. 如果在选择表单设计图面时无法让Object Inspector显示表单事件,则Delphi安装会出现配置问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.