Creating a FireMonkey Application
Go Up to FireMonkey Applications Guide
Contents |
Windows and Mac OS Applications
FireMonkey applications for Windows or Mac OS X can be written in either Delphi or C++. They may be 2D (HD) or 3D, or contain a mixture of both.
Note: While you can technically create a Delphi or C++Builder console application that uses FireMonkey, the vast majority of FireMonkey is geared toward building GUI applications. There are very few non-GUI types and functions.
New FireMonkey Projects
Choose the development language and whether the main form should be 2D (HD) or 3D:
- File > New > FireMonkey HD Application - Delphi
- File > New > FireMonkey HD Application - C++Builder
- File > New > Other > Delphi Projects > FireMonkey HD Application
- File > New > Other > Delphi Projects > FireMonkey 3D Application
- File > New > Other > C++Builder Projects > FireMonkey HD Application
- File > New > Other > C++Builder Projects > FireMonkey 3D Application
The IDE creates the framework for a FireMonkey application and opens the Form Designer, displaying the main form, a new subclass of either TForm or TForm3D.
New FireMonkey Forms
Add additional forms using the correct language:
- File > New > Other > Delphi Projects > Delphi Files > FireMonkey HD Form
- File > New > Other > Delphi Projects > Delphi Files > FireMonkey 3D Form
- File > New > Other > C++Builder Projects > C++Builder Files > FireMonkey HD Form
- File > New > Other > C++Builder Projects > C++Builder Files > FireMonkey 3D Form
The New Items dialog box can also be reached through the project's context menu: Add New > Other.
Every FireMonkey form unit has a companion form file with the extension .fmx.
Uses/Includes for FireMonkey Forms
A Delphi form declares the following units in the uses section of its .pas file:
uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs;
A C++ form includes the following headers:
#include <Classes.hpp> #include <FMX.Controls.hpp> #include <FMX.Forms.hpp>