Einzelnen Beitrag anzeigen

Benutzerbild von Gollum
Gollum

Registriert seit: 14. Jan 2003
Ort: Boxberg
456 Beiträge
 
Delphi 10.1 Berlin Professional
 
#2

Re: BUG in VT with Timagelist ?

  Alt 5. Feb 2010, 08:28
Hallo,

I always had this problem, but I found the solution in the Demo-Program of the VT.

Use the function below in the OnCreate-Event of your Form:
Delphi-Quellcode:
uses
  Controls, CommCtrl;

// To show smooth images we have to convert the image list from 16 colors to high color.
procedure ConvertToHighColor(ImageList: TImageList);
var IL:TImageList;
begin
  // Have to create a temporary copy of the given list, because the list is cleared on handle creation.
  IL:=TImageList.Create(nil);
  try
    IL.Assign(ImageList);
    with ImageList do
      Handle:=ImageList_Create(Width, Height, ILC_COLOR16 or ILC_MASK, Count, AllocBy);
    ImageList.Assign(IL);
  finally
    IL.Free();
  end; // try
end;
  Mit Zitat antworten Zitat