VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00C0C0C0&
   Caption         =   "VB6  例10-14  陀螺转动"
   ClientHeight    =   1950
   ClientLeft      =   2745
   ClientTop       =   1860
   ClientWidth     =   4995
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "V6bj10-14.frx":0000
   LinkMode        =   1  'Source
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   130
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   333
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   555
      Left            =   240
      ScaleHeight     =   525
      ScaleWidth      =   585
      TabIndex        =   2
      Top             =   60
      Width           =   615
   End
   Begin VB.CommandButton Command1 
      Caption         =   "转动"
      Height          =   390
      Left            =   2760
      TabIndex        =   0
      Top             =   120
      Width           =   1125
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   3990
      Top             =   120
   End
   Begin VB.PictureBox PictureClip1 
      Height          =   480
      Left            =   -3135
      ScaleHeight     =   420
      ScaleWidth      =   1140
      TabIndex        =   1
      Top             =   1560
      Width           =   1200
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   17
      Left            =   3960
      Picture         =   "V6bj10-14.frx":030A
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   16
      Left            =   3480
      Picture         =   "V6bj10-14.frx":0614
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   15
      Left            =   3000
      Picture         =   "V6bj10-14.frx":091E
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   14
      Left            =   2520
      Picture         =   "V6bj10-14.frx":0C28
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   13
      Left            =   2040
      Picture         =   "V6bj10-14.frx":0F32
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   12
      Left            =   1560
      Picture         =   "V6bj10-14.frx":123C
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   11
      Left            =   1080
      Picture         =   "V6bj10-14.frx":1546
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   10
      Left            =   600
      Picture         =   "V6bj10-14.frx":1850
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   9
      Left            =   120
      Picture         =   "V6bj10-14.frx":1B5A
      Top             =   1320
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   8
      Left            =   3960
      Picture         =   "V6bj10-14.frx":1E64
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   7
      Left            =   3480
      Picture         =   "V6bj10-14.frx":216E
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   6
      Left            =   3000
      Picture         =   "V6bj10-14.frx":2478
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   5
      Left            =   2520
      Picture         =   "V6bj10-14.frx":2782
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   4
      Left            =   2040
      Picture         =   "V6bj10-14.frx":2A8C
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   3
      Left            =   1560
      Picture         =   "V6bj10-14.frx":2D96
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   2
      Left            =   1080
      Picture         =   "V6bj10-14.frx":30A0
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   1
      Left            =   600
      Picture         =   "V6bj10-14.frx":33AA
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   0
      Left            =   120
      Picture         =   "V6bj10-14.frx":36B4
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Dim y As Integer

Private Sub runtop()
    Static y As Integer
    y = y + 1: If y = 18 Then y = 0             ' 指定陀螺的某张图片
    Picture1.Picture = Image1(y).Picture        ' 图形框装入某张图片
    Form1.Icon = Image1(y).Picture              ' 窗体的Icon属性装入图片
End Sub
Private Sub Command1_Click()
    If Command1.Caption = "转动" Then
        Command1.Caption = "停止"
    Else
        Command1.Caption = "转动"
    End If
End Sub
Private Sub Timer1_Timer()
    If Command1.Caption = "停止" Then runtop
End Sub

