VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "平铺"
      Height          =   435
      Left            =   2940
      TabIndex        =   1
      Top             =   2280
      Width           =   1395
   End
   Begin VB.PictureBox Picture1 
      AutoSize        =   -1  'True
      Height          =   540
      Left            =   1140
      Picture         =   "sy10-15.frx":0000
      ScaleHeight     =   480
      ScaleWidth      =   480
      TabIndex        =   0
      Top             =   660
      Visible         =   0   'False
      Width           =   540
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim w, h
    w = Picture1.ScaleWidth                     ' 图形框的宽度
    h = Picture1.ScaleHeight                    ' 图形框的高度
    y = 0
    Do While y < Form1.ScaleHeight              ' 外循环控制有y方向
        x = 0
        Do While x < Form1.ScaleWidth           ' 内循环控制x方向
            PaintPicture Picture1.Picture, x, y ' 复制图片
            x = x + w                           ' 同一行的下一个位置
        Loop
        y = y + h                               ' y方向的下一个位置
    Loop
End Sub

