C++ComponentsLanguage FeatureLearn C++

How To Create Gorgeous Transparent App Windows With C++

C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications 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.

App windows don’t have to be gray rectangular slabs!

Sometimes some applications doesn’t formed in a rectangular form, they don’t need a form design and they may have different specific shapes (video and music player skins are like these examples), If we want to develop these kind of applications, we must hide window base and borders. In C++ Builder, we can easily develop these kind of transparent VCL applications.

Here’s how to make a transparent app window with C++ Builder

  1. Create a new VCL Application Project for Windows, 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,
  5. From the Object Inspector set it’s Color property to a color i.e. Black. Set TransparentColor property checked and Set TransparentColorValue to same color you set (i.e Black).
  6. Set its FormStyle property to fsStayOnTop
  7. Set its BorderStyle property to bsNone
  8. 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,

You can add images with black background, so on runtime your black background will not be displayed. In C++ Builder It is also very easy to do transparent FMX applications.


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.

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

How To Generate A Random File Name on Windows

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

How To Include Or Exclude Trailing Backslashes On Windows

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

How To Check Characters of File Names and Paths on Windows

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

How to use SameFileName method on Windows

en_USEnglish