简体   繁体   English

在RAD Studio XE2 FireMonkey HD App中没有触发OnCreate事件?

[英]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.

相关问题 RAD Studio XE2和Firemonkey - 访问TStringGrid单元格中的数据 - RAD Studio XE2 & Firemonkey - Accessing data in cell of TStringGrid Delphi XE2:为什么FireMonkey应用程序是高清的? - Delphi XE2: Why FireMonkey apps are HD? FireMonkey / Rad Studio XE2:如何在OS X上显示SaveDialog过滤器? - FireMonkey/Rad Studio XE2: How can I show the SaveDialog filter on OS X? 新的Delphi Rad Studio XE2内的FireMonkey(FMX)具有哪些详细功能? - Details of what features FireMonkey (FMX) inside the NEW Delphi Rad Studio XE2 contains? 如何在fireMonkey Rad studio XE2中为Mac Osx创建/编辑文本文件(.rtf)? - How to Create/Edit a text file (.rtf) for Mac Osx in fireMonkey Rad studio XE2? FireMonkey iOS RAD Studio XE2 - 在从 URL 加载的表单上显示图像 - FireMonkey iOS RAD Studio XE2 - Display Image on form loaded from URL 相当于RAD Studio XE2的Visual Studio WordLight加载项 - Equivalent of Visual Studio WordLight add-in for RAD Studio XE2 如何使我的Android应用程序能够使用3G(Firemonkey / RAD Studio XE6) - How to make my android app to be able using 3G (Firemonkey/RAD Studio XE6) 在Embarcadero RAD Studio XE2中是否可以(自然地)使用嵌套形式? - Is it possible (natively) to have a nested form in Embarcadero RAD Studio XE2? Rad Studio XE2-如何添加模板库 - Rad Studio XE2 - how to add template library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM