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.
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.
How do I make my apps have nonrectangular window shapes or transparent sections?
- Create a new Multi-Device FMX Application Project, save all project and unit files into a folder.
- Add a Button (TButton)
- If you are in code display press F12 to Form Design view
- Click on the Form Unit and from the Object Inspector set it’s Transparency property checked.
- Double Click to Button1 and add some lines to Button1Click() method as given below,
1 2 3 4 5 6 7 |
void __fastcall TForm1::Button1Click(TObject *Sender) { ShowMessage("Hey !!"); Form1->Close(); } |
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,
1 2 3 4 5 6 7 8 |
void __fastcall TForm1::Button1Click(TObject *Sender) { ShowMessage("Hey !!"); Form1->Transparency=false; } |
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?
Design. Code. Compile. Deploy.
Start Free Trial
Free C++Builder Community Edition