VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1575
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   1575
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   315
      Left            =   3600
      TabIndex        =   0
      Top             =   1140
      Width           =   915
   End
   Begin VB.Shape Shape1 
      Height          =   375
      Index           =   0
      Left            =   180
      Top             =   480
      Width           =   495
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
For i = 1 To 5
   Load Shape1(i)                               ' 装入Shape对象数组控件
   Shape1(i).Visible = True
   Shape1(i).Left = Shape1(i - 1).Left + 750    ' 设置Shape的显示位置
   Shape1(i).Shape = i                          ' 设置Shape的形状
Next i
End Sub
Private Sub Command1_Click()
Randomize
For i = 0 To 5
    Shape1(i).FillStyle = Int(Rnd * 8)              ' 设置填充模式
    Shape1(i).FillColor = QBColor(Int(Rnd * 15))    ' 设置填充颜色
Next i
End Sub

