G
gc1848
Unregistered / Unconfirmed
GUEST, unregistred user!
while not adoquery1.Eof do
begin
p1:=TPicture.Create;
p2:=TPicture.Create;
BM := TBitmap.Create;
p1.LoadFromFile('//192.168.1.2/pic/'+trim(adoquery1.fieldbyname('款号').AsString)+'.jpg');
PStretch(img1.Width,img1.Height,p1,p2);
bm.Width:=img1.Width;
bm.Height:=img1.Height;
bm.Canvas.Draw((img1.Width-p2.Width)div 2,(img1.Height-p2.Height)div 2,p2.Graphic);
i:=Img1.Add(bm,nil);
list[0]:=listview4.Items.Add;
list[0].Caption:=adoquery1.fieldbyname('款号').AsString;
list[0].ImageIndex:=i;
i:=i+1;
adoquery1.Next;
BM.Free;
p1.Free;
p2.Free;
end;
这样运行进会出来一下子把所有记录都显示出来,如果有个5000条记录要等上20分钟,他显示却是一下子全部出来,能不能做到一条记录一条记录的显示出来,显示完也要20分钟,但人的心理就会认为速度快。
begin
p1:=TPicture.Create;
p2:=TPicture.Create;
BM := TBitmap.Create;
p1.LoadFromFile('//192.168.1.2/pic/'+trim(adoquery1.fieldbyname('款号').AsString)+'.jpg');
PStretch(img1.Width,img1.Height,p1,p2);
bm.Width:=img1.Width;
bm.Height:=img1.Height;
bm.Canvas.Draw((img1.Width-p2.Width)div 2,(img1.Height-p2.Height)div 2,p2.Graphic);
i:=Img1.Add(bm,nil);
list[0]:=listview4.Items.Add;
list[0].Caption:=adoquery1.fieldbyname('款号').AsString;
list[0].ImageIndex:=i;
i:=i+1;
adoquery1.Next;
BM.Free;
p1.Free;
p2.Free;
end;
这样运行进会出来一下子把所有记录都显示出来,如果有个5000条记录要等上20分钟,他显示却是一下子全部出来,能不能做到一条记录一条记录的显示出来,显示完也要20分钟,但人的心理就会认为速度快。