implementation
var n: integer;
procedure TForm1.Button1Click(Sender: TObject);
var Image: TBitmap;
begin
Image:= TBitmap.Create;
if n < ImageList1.Count then
ImageList1.GetBitmap(n, Image);
BitBtn1.Glyph.Assign(Image)
inc(n, 2 );
if n > ImageList1.Count then
n:= 0 ;
Image.Free;
end ;
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then
ImageList1.FileLoad(rtBitMap,OpenDialog1.FileName,clBtnFace);
label1.Caption:= ' Количество иконок = ' + IntToStr(ImageList1.Count);
end ; |