帮帮我拉~~~
涟漪之湖 2008-04-06 03:38:42 procedure TForm1.Button1Click(Sender: TObject);
var
I:Integer;
Myrect:Trect;
Myimg:array[0..100] of Tbitmap;
const
pw=100;
ph=200;
begin
for I := 0 to FileListBox1.Items.Count - 1 do
begin
with myrect do
begin
left:=200+(pw+100)*(I mod 6+1);
top:=200+400*(I div 7);
right:=left+pw;
bottom:=top+ph;
end;
Printer.BeginDoc;
begin
Filelistbox1.ItemIndex:=I;
Myimg[I].LoadFromFile(filelistbox1.FileName);
Myimg[I]:=tbitmap.Create;
Printer.Canvas.StretchDraw(myrect,Myimg[I]);
end;
end;
end;
end.