How to dynamically add image VCL component development and application to imagelist
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061226152817104.html
Excuse me, have you ever added images to imagelist dynamically?
VaR
PIC: tbitmap;
Begin
PIC: = tbitmap. Create;
PIC. loadfromfile ('C: \ a.bmp ');
Imagelist1.add (PIC, PIC );
PIC. Free;
End;
My
To:
Lihuasoft)
VaR
PIC: tbitmap;
Begin
PIC: = tbitmap. Create;
PIC. loadfromfile ('C: \ a.bmp ');
Imagelist1.add (PIC, PIC );
PIC. Free;
End
Imagelist1.add (PIC, PIC );
What is the use of your first parameter here?
Some images can be successful, and some will prompt invalid image size
To upstairs: there is no need to answer the question. The landlord has already made a splash.
Posting time: 15:28:17
Now: 2007-02-11 .....
the size of imagelist1 must be the same as that of PIC; otherwise, the size of invalid image
var
PIC: tbitmap;
begin
PIC: = tbitmap. create;
pic. loadfromfile ('C: \ a.bmp ');
imagelist1.add (PIC, PIC);
pic. free;
end;