FMX.Forms.TApplication.CreateForm

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure CreateForm(const InstanceClass: TComponentClass; var Reference);

C++

void __fastcall CreateForm(const System::Classes::TComponentClass InstanceClass, void *Reference);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TApplication

Description

Creates a new FireMonkey form at run time.

Call CreateForm to dynamically create a FireMonkey form at run time. Developers do not need to add code for creating most forms, because typically one or more calls to CreateForm are added automatically to the project's source when using the form designer.

Tip: CreateForm does not create the given form immediately. It just adds a request to the pending list. RealCreateForms creates the real forms.

CreateForm creates a new form of the type specified by the FormClass parameter and assigns it to the variable given by the Reference parameter. The owner of the new form is the Application object.

Tip: By default, the form created by the first call to CreateForm in a project becomes the application's main form.

See Also