VERSION 5.00
Begin VB.Form Frmayjp 
   Caption         =   "看金牌猜奥运举办国"
   ClientHeight    =   5400
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9510
   LinkTopic       =   "Form1"
   ScaleHeight     =   5400
   ScaleWidth      =   9510
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Pic1 
      BackColor       =   &H00FFFFFF&
      Height          =   1575
      Left            =   4320
      ScaleHeight     =   1515
      ScaleWidth      =   4995
      TabIndex        =   9
      Top             =   3720
      Width           =   5055
   End
   Begin VB.CommandButton CmdReply 
      Caption         =   "答案"
      Height          =   375
      Left            =   1560
      TabIndex        =   8
      Top             =   4920
      Width           =   975
   End
   Begin VB.CommandButton CmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   3000
      TabIndex        =   7
      Top             =   4920
      Width           =   975
   End
   Begin VB.CommandButton CmdOk 
      Caption         =   "确认"
      Height          =   375
      Left            =   240
      TabIndex        =   6
      Top             =   4920
      Width           =   975
   End
   Begin VB.Frame FraSelect 
      Caption         =   "选择"
      Height          =   3495
      Left            =   4320
      TabIndex        =   3
      Top             =   120
      Width           =   5055
      Begin VB.ListBox LstName 
         Height          =   2580
         ItemData        =   "看金牌猜奥运举办国.frx":0000
         Left            =   120
         List            =   "看金牌猜奥运举办国.frx":0002
         TabIndex        =   4
         Top             =   720
         Width           =   4815
      End
      Begin VB.Label Lbl2 
         Caption         =   "图片金牌的奥运会是在那里举办的："
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   360
         Width           =   3135
      End
   End
   Begin VB.Frame FraView 
      Caption         =   "奥运金牌浏览"
      Height          =   4575
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3975
      Begin VB.HScrollBar HsbView 
         Height          =   255
         Left            =   120
         Max             =   28
         Min             =   1
         TabIndex        =   1
         Top             =   4080
         Value           =   1
         Width           =   3615
      End
      Begin VB.Image Imgview 
         Height          =   3375
         Left            =   120
         Stretch         =   -1  'True
         Top             =   240
         Width           =   3735
      End
      Begin VB.Label Lbl1 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   3720
         Width           =   3615
      End
   End
End
Attribute VB_Name = "Frmayjp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a(1 To 30) As String
Dim b(1 To 30) As String
Private Sub Form_Load()
   Imgview.Picture = LoadPicture("../奥运金牌图片/1.jpg")  '装载第一张图片
   Lbl1.Caption = "第1届奥运会"                        '显示第一张图片编号
    a(1) = "希腊雅典"
   b(1) = "1896 年"
   a(2) = "法国巴黎"
   b(2) = "1900 年"
   a(3) = "美国圣路易斯"
   b(3) = "1904 年"
   a(4) = "英国伦敦"
   b(4) = "1908 年"
   a(5) = "瑞典斯德哥尔摩"
   b(5) = "1912 年"
   a(6) = "没有举办"
   b(6) = "1916 年"
   a(7) = "比利时安特卫普"
   b(7) = "1920 年"
   a(8) = "法国巴黎"
   b(8) = "1924 年"
   a(9) = "荷兰阿姆斯特丹"
   b(9) = "1928 年"
   a(10) = "美国洛杉矶"
   b(10) = "1932 年"
   a(11) = "德国柏林"
   b(11) = "1936 年"
   a(12) = "没有举办"
   b(12) = "1940 年"
   a(13) = "没有举办"
   b(13) = "1944 年"
   a(14) = "英国伦敦"
   b(14) = "1948 年"
   a(15) = "芬兰赫尔辛基"
   b(15) = "1952 年"
   a(16) = "澳大利亚墨尔本"
   b(16) = "1956 年"
   a(17) = "意大利罗马"
   b(17) = "1960 年"
   a(18) = "日本东京"
   b(18) = "1964 年"
   a(19) = "墨西哥墨西哥城"
   b(19) = "1968 年"
   a(20) = "德国慕尼黑"
   b(20) = "1972 年"
   a(21) = "加拿大蒙特利尔"
   b(21) = "1976 年"
   a(22) = "前苏联莫斯科"
   b(22) = "1980 年"
   a(23) = "美国洛杉矶"
   b(23) = "1984 年"
   a(24) = "韩国汉城"
   b(24) = "1988 年"
   a(25) = "西班牙巴塞罗那"
   b(25) = "1992 年"
   a(26) = "美国亚特兰大"
   b(26) = "1996 年"
   a(27) = "澳大利亚悉尼"
   b(27) = "2000 年"
   a(28) = "希腊雅典沈阳"
   b(28) = "2004 年"
   
   For i = 28 To 1 Step -1
     LstName.AddItem a(i)
   Next i
   LstName.RemoveItem 22
   LstName.RemoveItem 16
   LstName.RemoveItem 15
End Sub
Private Sub Cmdok_Click()
   Pic1.Cls                                    '清除容器显示内容
   Pic1.Print "我认为该届奥运会是:"      '回答问题
   Pic1.Print                                  '空行
   Pic1.Print Space(4) + LstName.List(LstName.ListIndex)
End Sub

Private Sub CmdReply_Click()
  Dim m As String, n As Integer
  n = HsbView.Value                    '滚动条的当前值为图像序号
  m = LstName.List(LstName.ListIndex)  '列表框当前选项信息
  Pic1.Cls
  If a(n) = m Then                     '问题答案
     Pic1.Print "恭喜你答对了!!！"
  Else
     Pic1.Print "遗憾你答错了!!!"
  End If
  Lbl1.Caption = a(n)
  Pic1.Print
  Pic1.Print Space(4) + "这是" + a(n): Pic1.Print
  Pic1.Print
  Pic1.Print Space(4) + "是" & b(n) & "举办的第" & n & "届奥运会"
End Sub



Private Sub Hsbview_Change()
   v = "../奥运金牌图片/" + CStr(HsbView.Value) + ".jpg"   '图片存储路径
   Imgview.Picture = LoadPicture(v)                '装载图片
   Lbl1.Caption = "第" + CStr(HsbView.Value) + "届奥运会" '显示图片编号
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Unload Me
   Frmcck.Show
End Sub

Private Sub CmdCancel_Click()
  Unload Me
End Sub

