⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 dephi查询代码
💻 FRM
字号:
VERSION 5.00
Object = "{27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0"; "PICCLP32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   BorderStyle     =   1  'Fixed Single
   Caption         =   "SIS"
   ClientHeight    =   3135
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3315
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3135
   ScaleWidth      =   3315
   StartUpPosition =   2  '屏幕中心
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   7
      Top             =   2760
      Width           =   3315
      _ExtentX        =   5847
      _ExtentY        =   661
      Style           =   1
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ProgressBar ProgressBar1 
      Height          =   2175
      Left            =   2040
      TabIndex        =   3
      Top             =   120
      Width           =   375
      _ExtentX        =   661
      _ExtentY        =   3836
      _Version        =   393216
      Appearance      =   1
      Max             =   200
      Orientation     =   1
      Scrolling       =   1
   End
   Begin VB.Timer Timer1 
      Interval        =   5
      Left            =   1680
      Top             =   1920
   End
   Begin VB.CommandButton Command3 
      Caption         =   "&Exit"
      Height          =   735
      Left            =   2520
      Picture         =   "Form1.frx":0442
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1560
      Width           =   735
   End
   Begin PicClip.PictureClip PictureClip1 
      Left            =   4080
      Top             =   1440
      _ExtentX        =   3704
      _ExtentY        =   3704
      _Version        =   393216
      Rows            =   3
      Cols            =   3
      Picture         =   "Form1.frx":0884
   End
   Begin VB.CommandButton Command2 
      Caption         =   "&KEY"
      Height          =   735
      Left            =   2520
      Picture         =   "Form1.frx":EE86
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   840
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Begin"
      Height          =   735
      Left            =   2520
      Picture         =   "Form1.frx":F2C8
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   120
      Width           =   735
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   255
      Left            =   240
      Max             =   10
      Min             =   1
      TabIndex        =   5
      Top             =   2520
      Value           =   10
      Width           =   2895
   End
   Begin VB.Frame Frame1 
      Caption         =   "Speed:(10)"
      Height          =   735
      Left            =   -120
      TabIndex        =   6
      Top             =   2280
      Width           =   3615
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   15
      Left            =   2040
      TabIndex        =   4
      Top             =   120
      Width           =   495
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   10
      Left            =   240
      Stretch         =   -1  'True
      Top             =   2040
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.Image Image3 
      Height          =   495
      Left            =   960
      Top             =   2160
      Width           =   495
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   9
      Left            =   1920
      Stretch         =   -1  'True
      Top             =   1320
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   8
      Left            =   1320
      Stretch         =   -1  'True
      Top             =   1320
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   7
      Left            =   720
      Stretch         =   -1  'True
      Top             =   1320
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   6
      Left            =   120
      Stretch         =   -1  'True
      Top             =   1320
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   5
      Left            =   1320
      Stretch         =   -1  'True
      Top             =   720
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   4
      Left            =   720
      Stretch         =   -1  'True
      Top             =   720
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   3
      Left            =   120
      Stretch         =   -1  'True
      Top             =   720
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   2
      Left            =   1320
      Stretch         =   -1  'True
      Top             =   120
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   1
      Left            =   720
      Stretch         =   -1  'True
      Top             =   120
      Width           =   615
   End
   Begin VB.Image Image1 
      Height          =   615
      Index           =   0
      Left            =   120
      Stretch         =   -1  'True
      Top             =   120
      Width           =   615
   End
   Begin VB.Menu mnuhelp 
      Caption         =   "Help"
      Visible         =   0   'False
      Begin VB.Menu mnuhelphelp 
         Caption         =   "Help"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim time_total As Boolean
Dim bh(0 To 10) As Integer


Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = "Click me to begin the game!"
End Sub

Private Sub Command2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = "Click me to watch the answer!"
End Sub

Private Sub Command3_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub Command3_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = "Click me to close me!"
End Sub

Private Sub Form_Load()
    time_total = False
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = ""
End Sub

Private Sub Frame1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = "Move me to change speed!"
End Sub

Private Sub Frame1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub HScroll1_Change()
    Frame1.Caption = "Speed:(" + CStr(HScroll1.Value) + ")"
End Sub

Private Sub Image1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = ""
End Sub

Private Sub Image1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub mnuhelphelp_click()
    a = MsgBox("SIS,made by crazyfightboy,2001.1.24", vbOKOnly, "About")
End Sub
Sub swep_picture(picture_1, picture_2)
    '交换数组结构的内容
    ls = bh(picture_1)
    bh(picture_1) = bh(picture_2)
    bh(picture_2) = ls
    '交换图像
    Image1(9).Picture = Image1(picture_1).Picture
    Image1(picture_1).Picture = Image1(picture_2).Picture
    Image1(picture_2).Picture = Image1(9).Picture
    Image1(9).Picture = Image3.Picture
End Sub

Private Sub Command1_Click()
    HScroll1.Enabled = False
    '结构初始化
    For i = 0 To 10
        bh(i) = i
    Next i
    Randomize (Val(Mid$(Time$, 4, 2)))
    '生成8个随机数
    For i = 0 To 8
        a = i + Int(Rnd * (9 - i))
        b = bh(i)
        bh(i) = bh(a)
        bh(a) = b
    Next
    '产生图片的碎片
    For i = 0 To 8
        Image1(i).Picture = PictureClip1.GraphicCell(bh(i))
    Next i
    '作一空白图
    Image1(9).Picture = Image3.Picture
    '计时器开启
    ProgressBar1.Value = 0
    time_total = True
End Sub

Private Sub Command2_Click()
    HScroll1.Enabled = True
    time_total = False
    For i = 0 To 8
        Image1(i).Picture = PictureClip1.GraphicCell(i)
    Next i
End Sub


Private Sub Command3_Click()
    end_message = MsgBox("Are you sure to close me?", vbYesNo, "???")
    If end_message = vbYes Then
        a = MsgBox("Made by crazyfightboy", vbOKOnly, "SIS")
        End
    End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub Image1_Click(Index As Integer)
    Dim sis As Boolean
    sis = True
    '判断是非
    For i = 0 To 8
        sis = sis And bh(i) = i
    Next i
    '如果不正确,则交换图片
    If Not sis Then
        Select Case Index
            Case 0
                Call swep_picture(0, 10)
            Case 1
                Call swep_picture(1, 10)
            Case 2
                Call swep_picture(2, 10)
            Case 3
                Call swep_picture(3, 10)
            Case 4
                Call swep_picture(4, 10)
            Case 5
                Call swep_picture(5, 10)
            Case 6
                Call swep_picture(6, 10)
            Case 7
                Call swep_picture(7, 10)
            Case 8
                Call swep_picture(8, 10)
        End Select
    Else
        HScroll1.Enabled = True
        time_total = False
        TF = MsgBox("You are a cleverboy!", vbOKOnly, "Good")
    End If
End Sub


Private Sub ProgressBar1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub ProgressBar1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    StatusBar1.SimpleText = ""
End Sub


Private Sub StatusBar1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 2 Then
        PopupMenu mnuhelp
    End If
End Sub

Private Sub Timer1_Timer()
    If time_total = True Then
        ProgressBar1.Value = ProgressBar1.Value + (HScroll1.Value / 10)
        If ProgressBar1.Value = 200 Then
            time_total = False
            a = MsgBox("You are a foolishbody!", vbOKOnly, "GAME OVER")
            Call Command1_Click
        End If
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -