📄 options.frm
字号:
VERSION 5.00
Begin VB.Form frmOptions
BorderStyle = 3 'Fixed Dialog
Caption = "VBtris32 Options"
ClientHeight = 2580
ClientLeft = 1140
ClientTop = 1515
ClientWidth = 2295
ControlBox = 0 'False
Icon = "Options.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 2580
ScaleWidth = 2295
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command1
Caption = "Cancel"
Height = 300
Left = 1260
TabIndex = 6
Top = 2160
Width = 915
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 300
Left = 120
TabIndex = 5
Top = 2160
Width = 915
End
Begin VB.CheckBox chkSkipIntro
Alignment = 1 'Right Justify
Caption = "Skip Intro Window"
Height = 375
Left = 120
TabIndex = 4
Top = 1680
Width = 1845
End
Begin VB.CheckBox chkPlaySounds
Alignment = 1 'Right Justify
Caption = "Play Sounds"
Height = 375
Left = 120
TabIndex = 3
Top = 1080
Width = 1845
End
Begin VB.CheckBox chkFillLines
Alignment = 1 'Right Justify
Caption = "Fill Lines at Start"
Height = 375
Left = 120
TabIndex = 2
Top = 480
Width = 1845
End
Begin VB.TextBox txtStartingLevel
Height = 285
Left = 1680
MaxLength = 1
TabIndex = 1
Text = "0"
Top = 120
Width = 375
End
Begin VB.Line Line4
BorderColor = &H00FFFFFF&
Index = 1
X1 = 2160
X2 = 2175
Y1 = 1560
Y2 = 1575
End
Begin VB.Line Line3
BorderColor = &H00808080&
Index = 1
X1 = 105
X2 = 120
Y1 = 1560
Y2 = 1575
End
Begin VB.Line Line2
BorderColor = &H00808080&
Index = 1
X1 = 120
X2 = 2160
Y1 = 1545
Y2 = 1545
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
Index = 1
X1 = 120
X2 = 2160
Y1 = 1575
Y2 = 1575
End
Begin VB.Line Line4
BorderColor = &H00FFFFFF&
Index = 0
X1 = 2160
X2 = 2175
Y1 = 960
Y2 = 975
End
Begin VB.Line Line3
BorderColor = &H00808080&
Index = 0
X1 = 105
X2 = 120
Y1 = 960
Y2 = 975
End
Begin VB.Line Line2
BorderColor = &H00808080&
Index = 0
X1 = 120
X2 = 2160
Y1 = 945
Y2 = 945
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
Index = 0
X1 = 120
X2 = 2160
Y1 = 975
Y2 = 975
End
Begin VB.Label Label1
Caption = "Starting Level (0 - 9):"
Height = 255
Left = 120
TabIndex = 0
Top = 150
Width = 1695
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 cmdOk_Click()
'-------------------------------------------------------
'Hide frmOptions and record the changes made to the
'game options
'-------------------------------------------------------
StartingLevel = Val(txtStartingLevel)
If chkFillLines.Value = 1 Then
FillLines = True
Else
FillLines = False
End If
If chkPlaySounds.Value = 1 Then
PlaySounds = True
Else
PlaySounds = False
End If
If chkSkipIntro.Value = 1 Then
HideSplash = True
Else
HideSplash = False
End If
WriteINIFile
frmOptions.Hide
End Sub
Private Sub Command1_Click()
'-------------------------------------------------------
'Hide frmOptions without recording the changes made to
'the game options
'-------------------------------------------------------
frmOptions.Hide
End Sub
Private Sub Form_Load()
frmOptions.Left = ((frmVBtris.Width - frmOptions.Width) / 2) + frmVBtris.Left
frmOptions.Top = ((frmVBtris.Height - frmOptions.Height) / 2) + frmVBtris.Top
End Sub
Private Sub txtStartingLevel_LostFocus()
'-------------------------------------------------------
'Ensure that an acceptable value has been entered
'-------------------------------------------------------
If Not (IsNumeric(txtStartingLevel)) Then
MsgBox "You must enter a number between 0 and 9", , "VBtris32"
txtStartingLevel = StartingLevel
ElseIf (txtStartingLevel < 0) Or (txtStartingLevel > 9) Then
MsgBox "You must enter a number between 0 and 9", , "VBtris32"
txtStartingLevel = StartingLevel
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -