C++ComponentsLanguage FeatureLearn C++

How To Make Transparent FMX Applications With C++ Builder

C++ Builder is the easiest and fastest C and C++ IDE for building everything from simple to fully professional applications on the Windows, MacOS, iOS and 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. 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.

Learn To Develop Transparent FMX Applications With C++ Builder
An FMX transparent form in action

Sometimes some applications do not appear as a rectangular window – they may have different specific shapes – for example video and music player skins are often like this. If we want to develop these kinds of applications, we must hide window base and borders. In C++ Builder, we can easily develop these kind of transparent FMX applications. FireMonkey (FMX) framework supports modern ways to manipulate transparency of each UI elements, bitmaps, canvas drawings, and allows you to set pixel colors in ARGB form. I should note that, for the Firemonkey FMX applications, Windows applications successfully runs with transparency, I personally haven’t checked if the other operating systems supports this.

Learn To Develop Transparent FMX Applications With C++ Builder
The same transparent form in the Form Designer

How do I make my apps have nonrectangular window shapes or transparent sections?

  1. Create a new Multi-Device FMX Application Project, save all project and unit files into a folder.
  2. Add a Button (TButton)
  3. If you are in code display press F12 to Form Design view
  4. Click on the Form Unit and from the Object Inspector set it’s Transparency property checked.
  5. Double Click to Button1 and add some lines to Button1Click() method as given below,

Sometimes we may need to show full window form, you can control these settings on runtime, for example we can show full form with it’s border style as in this example below,

We can add images with a background, and we can choose that color as a transparent color. It will automatically make the form’s color as the alpha color. At design time and runtime your background color will not be displayed. We can also add PNG or other images with alpha colors.

FMX Supports full alpha color operations so you can create new bitmaps and you can draw and modify each pixel of its Canvas easily. You can create animations and other effects on transparent apps professionally. For more details please see;

Learn To Create Alpha Color Bitmap From A Bitmap By A Given Color In Modern C++
Colors In Modern C++ For Windows Development
Learn About Bitmap Operations In C++ Builder (FireMonkey)

It is also very easy to do transparent VCL applications in C++ Builder.

RAD Studio C++ Builder is a great environment for learning to use C++ and is also powerful enough for all your development needs. Why not download and try C++ builder today?

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.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial

Free C++Builder Community Edition

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++17Language FeatureLearn C++

How To Use Skia Images in C++ Builder?

C++C++17Code SnippetGame DevelopmentLanguage FeatureLearn C++

What Is Skia In Modern C++?

C++C++17Learn C++

How To Use Skia in C++ Builder 12?

C++C++17C++20Introduction to C++Language FeatureLearn C++Syntax

Learn How To Use Clamp (std::clamp) In Modern C++ 17 and Beyond