[DUG] TImage/ImageList/Transparent/XP Manifest

John Bird johnkbird at paradise.net.nz
Wed Feb 24 14:23:23 NZDT 2010


I have been puzzling over how a bitmap sometimes paints for a long time, I 
have a circular image (of a LED) that I want to have a transparent 
surrounding to as the LED is round and the surround is square.

In this case, I have 5 images in a Timagelist, and switch the one I want 
using code like

  if imageindex=0 then imagelist1.GetBitmap(0,image1.picture.bitmap);
  if imageindex=1 then imagelist1.GetBitmap(1,image1.picture.bitmap);

In test programs it works as expected, but in the actual program there is 
always a white square around the image.

I have finally found the culprit - if XPManifest is added its seems to 
interfere with the settings to do with transparency, ie if its there I get 
the white border instead of it being transparent.

Anyone come across this and have a workaround?

D2007/Vista

John 




More information about the Delphi mailing list