Search code examples
delphidelphi-xe2firemonkey

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..

procedure TForm1.FormCreate(Sender: TObject);
begin

//some code...
end;

Solution

  • 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. Open that up from the View menu, or press F11. Click on the surface of the form. Select the second page of the Object Inspector, called Events. And there you can relate events to handlers just as you are used to in 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.