Answer 2:
在窗体上放一个Image,设置如下属性:
AutoSize=True;
Visible=False
然后写OnPaint事件:
procedure TForm1.FormPaint(Sender: TObject);
var
i,j:integer;
bmp:TBitmap;
begin
bmp:=TBitmap.Create;
i:=0;
try
bmp.Assign(Image1.Picture.Bitmap);
while i<self.ClientWidth do begin
j:=0;
while j<self.ClientHeight do begin
self.Canvas.Draw(i,j,bmp);
j:=j+bmp.Height;
end;
i:=i+bmp.Height;
end;
finally
bmp.Free;
end;
end;