Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Form erstellen - 2 Varianten, welche anwenden? (https://www.delphipraxis.net/152561-form-erstellen-2-varianten-welche-anwenden.html)

idefix2 27. Jun 2010 13:30

Form erstellen - 2 Varianten, welche anwenden?
 
Um zur Laufzeit ein neues Formular zu erstellen, kann ich

Delphi-Quellcode:
Application.CreateForm(TmyForm, myForm)
oder auch

Delphi-Quellcode:
myform := TmyForm.create(Application)
schreiben. Gibt es eigentlich zwischen diesen beiden Varianten einen Unterschied, oder passiert in beiden Fällen genau das gleiche?

mkinzler 27. Jun 2010 13:38

AW: Form erstellen - 2 Varianten, welche anwenden?
 
Dürfte im Endeffekt egal sein

Namenloser 27. Jun 2010 13:43

AW: Form erstellen - 2 Varianten, welche anwenden?
 
Einziger Unterschied ist, dass
Delphi-Quellcode:
Application.CreateForm(TmyForm, myForm)
das erzeugte Formular automatisch als Mainform setzt, wenn noch keines vorhanden ist.


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:10 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz