Dim wid As Single
Dim hgt As Single
Dim x As Single
Dim y As Single
wid = Picture1.ScaleWidth 'Picture1为要平铺的图片
hgt = Picture1.ScaleHeight
y = 0
Do While y < ScaleHeight
x = 0
Do While x < ScaleWidth
PaintPicture Picture1.Picture, _
x, y, wid, hgt
x = x + wid
Loop
y = y + hgt
Loop
End Sub
Private Sub Form_Paint()
Dim wid As Single
Dim hgt As Single
Dim x As Single
Dim y As Single
wid = Picture1.ScaleWidth 'Picture1为要平铺的图片
hgt = Picture1.ScaleHeight
y = 0
Do While y < ScaleHeight
x = 0
Do While x < ScaleWidth
PaintPicture Picture1.Picture, _
x, y, wid, hgt
x = x + wid
Loop
y = y + hgt
Loop