C++Introduction to C++Language FeatureLearn C++

How To Use Form Properties In C++ Cross Platform Apps

How To Use Form Properties In C++ Cross Platform Apps

C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional cross platform apps on the Windows, MacOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files and LSP support for code. C++ Builder comes with Rapid Application Development Studio, also known as RAD Studio, and C++ Builder is one of the most professional IDE’s that work under RAD Studio. It is the oldest IDE (it began as Borland TurboC in 1990 and was later renamed Borland C++ Builder). Under the Embarcadero brand it comes with new versions, features, updates and support. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs. There is a free C++ Builder Community Edition for students, beginners and startups.

You can download the free C++ Builder Community Edition here: https://www.embarcadero.com/products/cbuilder/starter.
Professional developers can use the Professional, Architect or Enterprise versions of C++ Builder. Please visit https://www.embarcadero.com/products/cbuilder.

A description of forms (TForm) in the FireMonkey FMX framework for cross platform apps

TForm represents a standard FireMonkey application window form. When we create forms in the Form designer at design time, they are implemented as descendants of TForm. Forms can represent the application’s main window, or dialog boxes, or various preferences-related windows. A form can contain any other FireMonkey objects, such as TButtonTCheckBoxTComboBox objects, and so on. All the Properties of Forms in the FireMonkey framework can be found here and Methods of Forms can be found here in official DocWiki.

How To Use Form Properties In C++ Cross Platform Apps A view of multiple types of form in a single cross platform app

A short example of accessing form properties in a cross platform app using C++

Let’s give some examples of its properties. We can set or change properties (Caption, WindowsState, FullScreen, Quality, Fill->Color, Transparency, Visible, ShowHint, Tag, and more) of Forms on design with Object Inspector panel and on runtime, for example, we can set Caption or Hint of Forms on runtime. Here is an example to set some of the properties that we mostly used,

We can also get some information about our Form that we set on design time or they can be changed on run time because of Windows State, Border Kind, Alignments, FullScreen property, etc. Here is an example to get Caption, ClientWidth, ClientHeight, Width, Height of the form.

How to manipulate a cross platform app form at runtime in C++

We can use Hide() and Show() methods to hide and show our forms. We can use SendToBack() and BringToFront() methods, to send our form to the back or to bring to front. There are many methods and properties that we can use. All the Properties of Forms in FireMonkey frame work can be found here and Methods of Forms can be found here in official DocWiki.

Forms are one of the most important parts of our applications, so each property may change your application behavior. For example if you set its Quality to HighQuality you will have better and smooth texts and drawings, if you set to HighPerformance you will get normal but faster display this may improve your animations and speed of drawings.

How To Use Form Properties In C++ Cross Platform Apps A view of themes


Another great feature of Forms are Styles that works on all official UI elements of FireMonkey as a skin. You can easily apply skins to your forms and components on it. You can also create your own style with the Style Manager. We explained in our posts before that how you can apply styles on VCL applications and styles on FMX applications

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.

About author

Dr. Yilmaz Yoru has 35+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He graduated and received his MSc and PhD degrees from the Department of Mechanical Engineering of Eskisehir Osmangazi University. He is the founder and CEO of ESENJA LLC Company. His interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.
Related posts
C++C++11C++14C++17C++20Introduction to C++Learn C++

Learn Copy Constructors in C++ Classes

C++C++11C++14C++17Introduction to C++Learn C++Syntax

Learn How To Use Types Of Destructors In C++?

C++C++11C++14Learn C++Syntax

How To Convert u32string To A wstring In C++

C++C++11C++14C++17C++20Introduction to C++Learn C++

How To Learn The Move Constructors In Modern C++?