C cch_b Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-30 #1 我想保存ImageList里面的内容,应该如何做呢?它可没提供什么SaveToXX的方法, 总不能叫我一个一个保存ImageList里的每个图像吧。。。。。。。。。。 呜,我需要帮助
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-30 #3 //write imagelist procedure TForm1.Button1Click(Sender: TObject); var FS : TFileStream; begin FS := TFileStream.Create('C:/save.Dat',fmCreate); FS.WriteComponent(imagelist1); FS.Free; end; //Read imagelist procedure TForm1.Button2Click(Sender: TObject); var FS : TFileStream; begin RegisterClass(TImageList); FS := TFileStream.Create('C:/save.Dat',fmOpenRead); TComponent(imagelist1) := FS.ReadComponent(imagelist1); FS.Free; end;
//write imagelist procedure TForm1.Button1Click(Sender: TObject); var FS : TFileStream; begin FS := TFileStream.Create('C:/save.Dat',fmCreate); FS.WriteComponent(imagelist1); FS.Free; end; //Read imagelist procedure TForm1.Button2Click(Sender: TObject); var FS : TFileStream; begin RegisterClass(TImageList); FS := TFileStream.Create('C:/save.Dat',fmOpenRead); TComponent(imagelist1) := FS.ReadComponent(imagelist1); FS.Free; end;
L lus_liu Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-30 #4 直接保存成一个bmp文件,调入时让他自动分割就可以了
C cch_b Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-30 #5 hubdog,你实在是太可爱了,万分感谢。 其他人意思一下吧。