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

📄 frmoptio.frm

📁 八脚蟹》射击游戏源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmOptions 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "MVaders Game Options"
   ClientHeight    =   2580
   ClientLeft      =   690
   ClientTop       =   1530
   ClientWidth     =   7710
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   Icon            =   "FRMOPTIO.frx":0000
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2580
   ScaleWidth      =   7710
   Begin VB.CommandButton cmdCancel 
      Appearance      =   0  'Flat
      Caption         =   "&Cancel"
      Height          =   315
      Left            =   6660
      TabIndex        =   16
      Top             =   540
      Width           =   975
   End
   Begin VB.CommandButton cmdOk 
      Appearance      =   0  'Flat
      Caption         =   "&Ok"
      Height          =   315
      Left            =   6660
      TabIndex        =   20
      Top             =   120
      Width           =   975
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   7
      Left            =   1980
      Max             =   20
      Min             =   10
      TabIndex        =   15
      Top             =   2220
      Value           =   10
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   6
      Left            =   1980
      Max             =   15
      Min             =   5
      TabIndex        =   14
      Top             =   1920
      Value           =   5
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   5
      Left            =   1980
      Max             =   25
      Min             =   15
      TabIndex        =   13
      Top             =   1620
      Value           =   15
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   4
      Left            =   1980
      Max             =   16
      Min             =   6
      TabIndex        =   12
      Top             =   1320
      Value           =   6
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   3
      LargeChange     =   5
      Left            =   1980
      Max             =   95
      Min             =   70
      SmallChange     =   5
      TabIndex        =   11
      Top             =   1020
      Value           =   70
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   2
      Left            =   1980
      Max             =   5
      Min             =   3
      TabIndex        =   10
      Top             =   720
      Value           =   3
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   1
      LargeChange     =   5
      Left            =   1980
      Max             =   60
      Min             =   30
      SmallChange     =   5
      TabIndex        =   9
      Top             =   420
      Value           =   30
      Width           =   3555
   End
   Begin VB.HScrollBar hscChange 
      Height          =   240
      Index           =   0
      LargeChange     =   5
      Left            =   1980
      Max             =   80
      Min             =   20
      SmallChange     =   5
      TabIndex        =   8
      Top             =   120
      Value           =   20
      Width           =   3555
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   7
      Left            =   5700
      TabIndex        =   25
      Top             =   2220
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   6
      Left            =   5700
      TabIndex        =   24
      Top             =   1920
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   5
      Left            =   5700
      TabIndex        =   23
      Top             =   1620
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   4
      Left            =   5700
      TabIndex        =   22
      Top             =   1320
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   3
      Left            =   5700
      TabIndex        =   21
      Top             =   1020
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   2
      Left            =   5700
      TabIndex        =   19
      Top             =   720
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   1
      Left            =   5700
      TabIndex        =   18
      Top             =   420
      Width           =   735
   End
   Begin VB.Label lblVal 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   0
      Left            =   5700
      TabIndex        =   17
      Top             =   120
      Width           =   735
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Player Fire Speed:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   7
      Left            =   60
      TabIndex        =   7
      Top             =   2220
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Player Speed:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   6
      Left            =   60
      TabIndex        =   6
      Top             =   1920
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Invader Down Step:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   5
      Left            =   60
      TabIndex        =   5
      Top             =   1620
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Invader Fire Speed:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   4
      Left            =   60
      TabIndex        =   4
      Top             =   1320
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Invader Fire Freq:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   3
      Left            =   60
      TabIndex        =   3
      Top             =   1020
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Invader Speed:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   2
      Left            =   60
      TabIndex        =   2
      Top             =   720
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Invader Spacing:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   1
      Left            =   60
      TabIndex        =   1
      Top             =   420
      Width           =   1815
   End
   Begin VB.Label lblPrompt 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Timer Setting:"
      ForeColor       =   &H80000008&
      Height          =   195
      Index           =   0
      Left            =   60
      TabIndex        =   0
      Top             =   120
      Width           =   1815
   End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()

'Exit without making changes
Unload frmOptions

End Sub

Private Sub cmdOk_Click()

'Set the values player has selected
GamePrefs.iTimer = hscChange(0).Value
GamePrefs.iIGap = hscChange(1).Value
GamePrefs.iISpeed = hscChange(2).Value
GamePrefs.fIBFreq = hscChange(3).Value / 100
GamePrefs.iIBSpeed = hscChange(4).Value
GamePrefs.iIDrop = hscChange(5).Value
GamePrefs.iPSpeed = hscChange(6).Value
GamePrefs.iPBSpeed = hscChange(7).Value

'Save the changes
SavePrefs

'And exit
Unload frmOptions

End Sub

Private Sub Form_Activate()

'Initialise all the scrollers
hscChange(0).Value = GamePrefs.iTimer
hscChange(1).Value = GamePrefs.iIGap
hscChange(2).Value = GamePrefs.iISpeed
hscChange(3).Value = Int(GamePrefs.fIBFreq * 100)
hscChange(4).Value = GamePrefs.iIBSpeed
hscChange(5).Value = GamePrefs.iIDrop
hscChange(6).Value = GamePrefs.iPSpeed
hscChange(7).Value = GamePrefs.iPBSpeed

End Sub

Private Sub Form_Load()

'Center form on the screen
CenterForm Me

End Sub

Private Sub hscChange_Change(Index As Integer)

lblVal(Index).Caption = Format$(hscChange(Index).Value, "")

End Sub

Private Sub hscChange_Scroll(Index As Integer)

lblVal(Index).Caption = Format$(hscChange(Index).Value, "")

End Sub

⌨️ 快捷键说明

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