Delphi Image使用ImageList中的图片

var
  bmp: Tbitmap;
begin
  bmp := Tbitmap.Create;
  try
    if Rlt then
    begin
      imagelist1.GetBitmap(1, bmp);
      img1.Picture.Assign(bmp);
    end
    else
    begin      
      imagelist1.GetBitmap(0, bmp);
img1.Picture.Assign(bmp); end; finally bmp.Free; end;
 
  

你可能感兴趣的:(delphi)