Jump to content
Ian Branch

What is the difference??

Recommended Posts

Hi Team,

What is the difference, if any, between..

MyForm := TMyForm.Create(nil);


Application.CreateForm(TMyForm, MyForm)

Just curious.


Regards & TIA,


Share this post

Link to post

The first one will create TMyForm instance with no owner.


While the second one creates an instance of TMyForm owned by the application object. In case the form is the first form created by the application it will make it the mainform of the application. For more detail open VCL.Forms.

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