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?

close

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

33+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux and some other operating systems. Dr. Yilmaz Yoru was born in 1974, Eskisehir-Turkey. He graduated from the department of Mechanical Engineering of Eskisehir Osmangazi University in 1997. One year later he started to work in the same university as an assistant. He received his MSc and PhD degrees from the same department of the same university. He has married and he is a father of a son. Some of his interests are Programming, Thermodynamics, Fluid Mechanics and Artificial Intelligence. He also likes the graphical 2D & 3D design and high-end innovations.
Related posts
CC++C++17Introduction to C++Language FeatureLearn C++

What Is Count In C Programming?

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

Why Is C The Most Popular Programming Language?

CC++C++17Introduction to C++Learn C++Syntax

How To Use Switch In C++ And C Programming?

CC++C++17Introduction to C++Learn C++

What Are Header Files In C++ and C Programming?