Xel Naga
Xel Naga

Reputation: 956

32-bit transparent PNG problem in a legacy Delphi project

I try to modernize a legacy Delphi VCL project using Delphi 10.3.3. I can compile and build the application without any problem. The only problem is backgrounds of transparent PNG are displayed as black in runtime.

Here is what I do:

  1. Add MainMenu1 to the form and create menu items.
  2. Add ImageList1.
  3. Change ImageList1's ColorDepth to cd32Bit.
  4. Add transparent PNG files into ImageList1.
  5. Connect ImageList1 to MainManu1.

Here is the result in runtime:

image

These steps work perfect in a new Delphi 10.3.3 VCL project but there are black backgrounds in this legacy project. What can I do to solve the black background issue?

Upvotes: 3

Views: 266

Answers (1)

Uwe Raabe
Uwe Raabe

Reputation: 47694

Transparent images require Runtime Themes being activated in the Manifest section of the Project options.

Upvotes: 6

Related Questions