another difference is that
Application.CreateForm(TForm1, Form1)
will set Form1 to nil if it's call to TForm.Create() fails while
Form1 := TForm1.Create(Application)
will leave the value of Form1 unchanged if Create() raises an exception.
ns
-----Original Message-----
From: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: 21 July 2000 10:40
Subject: Re: [DUG]: What is the diff?
>
>
>actually the first one does require a var declaration. It uses the same var
as
>the second one. The Form1 in the project source is the var that is defined
in
>the forms .pas file.
>
>I think the difference is that the first form created with the
>Application.create() is made the main form for the application.
>
>Phil.
>
>
>
>
>"Neven MacEwan" <[EMAIL PROTECTED]> on 21/07/2000 16:10:23
>
>Please respond to [EMAIL PROTECTED]
>
>To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
>cc: (bcc: Phillip Middlemiss/NZ Forest Research Institute/NZ)
>
>Subject: [DUG]: What is the diff?
>
>
>
>Hiya All
>
>What is the difference between
>
>Application.CreateForm(TForm1, Form1)
>and
>Form1 := TForm1.Create(Application)?
>
>Apart from the fact that the first form does not requie a var declaration?
>TIA
>
>Regards Neven
>N.K. MacEwan B.E. E&E
>[EMAIL PROTECTED]
>
>---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
>
>
>
>
>
>---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz