请教各位!如何保存TImageList中的BMP文件呀,它没有SavetoFile该类的函数呀!

解决方案 »

  1.   

    //试试下面的~~
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i:integer;
      you_bit:tbitmap;
    begin
      you_bit:=tbitmap.create;
      for i:=0 to 10 do
        begin
          imagelist1.GetBitmap(i,you_bit);
          you_bit.SaveToFile('c:\'+inttostr(i)+'.bmp');
        end;
      you_bit.free;
    end;
      

  2.   

    //试试下面的~~
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i:integer;
      you_bit:tbitmap;
    begin
      you_bit:=tbitmap.create;
      for i:=0 to imagelist1.count-1 do
        begin
          imagelist1.GetBitmap(i,you_bit);
          you_bit.SaveToFile('c:\'+inttostr(i)+'.bmp');
        end;
      you_bit.free;
    end;