3

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?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Xel Naga
  • 826
  • 11
  • 28

1 Answers1

6

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

Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130
  • 1
    Thanks Uwe, it worked. This project dates back to 1997 and it still works in the newest Delphi Rio requiring tiny effort, that's why i love Delphi. – Xel Naga Mar 14 '20 at 20:09