RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TApplication.MainForm Property

Identifies which form in the application is the main window.

Pascal
property MainForm: TForm;
C++
__property TForm * MainForm;

Use MainForm to determine the form that acts as the application's main window. The main form is the first form created in the main body of the application. When the main form closes, the application terminates. 

When a new project is created, Form1 automatically becomes the value of the MainForm property. To assign a different form to the MainForm property, use the Forms page of the Project|Options dialog box at design time. MainForm cannot be modified at runtime; it is read-only. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!