Jump to content
Sign in to follow this  
Sonjli

Override the constructor of Main form

Recommended Posts

Hello,

I need to override the constructor of the main form of my FMX application.

The problem is that the mechanism that fmx uses to select the main form is very strange and the constructor of the main form is never called.

 

Anyone knows why this behaviour?

 

Thanks!

Eddy

Share this post


Link to post

I think that is the same than VCL...

Form1 is a Main-Form in project, as expected!

 

program Project1;

uses
  System.StartUpCopy,
  FMX.Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

image.thumb.png.24fc68d4087fb80c0703d6f2cc8d7724.png

Edited by programmerdelphi2k
  • Thanks 1

Share this post


Link to post
13 minutes ago, Sonjli said:

The problem is that the mechanism that fmx uses to select the main form is very strange and the constructor of the main form is never called

This statement is incorrect unless I am very mistaken. Please show your main form code and the project file. 

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×