📄 form2.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form Form2
BorderStyle = 3 'Fixed Dialog
Caption = "设置...."
ClientHeight = 3135
ClientLeft = 3690
ClientTop = 3330
ClientWidth = 5580
Icon = "Form2.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3135
ScaleWidth = 5580
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command1
Cancel = -1 'True
Caption = "继续游戏"
Height = 390
Left = 2940
TabIndex = 19
Top = 2580
Width = 1965
End
Begin MSComDlg.CommonDialog CommonDlg
Left = 3240
Top = 180
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Color = -2147483642
DialogTitle = "更改主框颜色"
End
Begin VB.CommandButton CmdOk
Caption = "确认从新开始"
Default = -1 'True
Height = 390
Left = 180
TabIndex = 2
Top = 2580
Width = 1965
End
Begin VB.Frame Frame2
Caption = "设置按键"
Height = 2475
Left = 2520
TabIndex = 1
Top = 0
Width = 2745
Begin VB.ComboBox combosetting
Height = 300
Index = 4
Left = 1020
Style = 2 'Dropdown List
TabIndex = 23
Top = 1680
Width = 1605
End
Begin VB.CommandButton CmdDefault
Caption = "默认"
Height = 315
Left = 75
TabIndex = 18
Top = 2040
Width = 855
End
Begin VB.CommandButton CmdAccept
Caption = "记住我的选择"
Height = 315
Left = 1080
TabIndex = 17
Top = 2040
Width = 1275
End
Begin VB.ComboBox combosetting
Height = 300
Index = 3
Left = 1020
Style = 2 'Dropdown List
TabIndex = 16
Top = 1260
Width = 1605
End
Begin VB.ComboBox combosetting
Height = 300
Index = 2
Left = 1020
Style = 2 'Dropdown List
TabIndex = 15
Top = 900
Width = 1605
End
Begin VB.ComboBox combosetting
Height = 300
Index = 1
Left = 1020
Style = 2 'Dropdown List
TabIndex = 14
Top = 540
Width = 1605
End
Begin VB.ComboBox combosetting
Height = 300
Index = 0
Left = 1020
Style = 2 'Dropdown List
TabIndex = 13
Top = 180
Width = 1605
End
Begin VB.Label labelstepdown
Caption = "单步下移"
Height = 255
Left = 120
TabIndex = 22
Top = 1680
Width = 855
End
Begin VB.Label Label8
Caption = "旋转"
Height = 210
Left = 120
TabIndex = 12
Top = 1320
Width = 510
End
Begin VB.Label Label7
Caption = "下移"
Height = 210
Left = 90
TabIndex = 11
Top = 960
Width = 510
End
Begin VB.Label Label6
Caption = "右移"
Height = 210
Left = 120
TabIndex = 10
Top = 585
Width = 465
End
Begin VB.Label Label5
Caption = "左移"
Height = 210
Left = 120
TabIndex = 9
Top = 240
Width = 510
End
End
Begin VB.Frame Frame1
Caption = "设置框架"
Height = 2475
Left = 0
TabIndex = 0
Top = 0
Width = 2460
Begin ComctlLib.Slider SliderUpgrade
Height = 210
Left = 900
TabIndex = 25
Top = 1440
Width = 1455
_ExtentX = 2566
_ExtentY = 370
_Version = 327682
MousePointer = 9
LargeChange = 100
SmallChange = 100
Min = 1000
Max = 2000
SelStart = 1000
TickFrequency = 100
Value = 1000
End
Begin VB.ComboBox ComboLevel
Height = 300
Left = 960
Style = 2 'Dropdown List
TabIndex = 21
Top = 960
Width = 1380
End
Begin VB.CommandButton CmdChgColor
Caption = "背景色"
Height = 405
Left = 180
TabIndex = 7
Top = 1860
Width = 750
End
Begin VB.ComboBox ComboCols
Height = 300
Left = 960
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 6
Top = 570
Width = 1380
End
Begin VB.ComboBox ComboRows
Height = 300
Left = 960
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 4
Top = 180
Width = 1380
End
Begin VB.Label Label4
Caption = "升级频率"
Height = 195
Left = 120
TabIndex = 24
Top = 1440
Width = 735
End
Begin VB.Label Label9
Caption = "等级"
Height = 225
Left = 180
TabIndex = 20
Top = 960
Width = 600
End
Begin VB.Label LabelPreView
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Height = 630
Left = 1080
TabIndex = 8
Top = 1740
Width = 1215
End
Begin VB.Label Label2
Caption = "列数"
Height = 225
Left = 180
TabIndex = 5
Top = 270
Width = 600
End
Begin VB.Label Label1
Caption = "行数"
Height = 225
Left = 180
TabIndex = 3
Top = 585
Width = 600
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CmdAccept_Click()
If CheckAvailable Then
vbMoveLeft = SetKey(0)
vbMoveRight = SetKey(1)
vbMoveDown = SetKey(2)
vbRevert = SetKey(3)
vbStepDown = SetKey(4)
Else
MsgBox "有键重复了!", vbOKOnly, "错误!"
End If
End Sub
Private Sub CmdChgColor_Click()
ChangColor
End Sub
Private Sub CmdDefault_Click()
vbMoveLeft = vbKeyLeft
vbMoveRight = vbKeyRight
vbMoveDown = vbKeyDown
vbRevert = vbKeyUp
vbStepDown = vbKeyNumpad0
combosetting(0).ListIndex = 36
combosetting(1).ListIndex = 38
combosetting(2).ListIndex = 39
combosetting(3).ListIndex = 37
combosetting(4).ListIndex = 42
End Sub
Private Sub CmdOk_Click()
Dim i As Integer
Col20 = ComboCols.ListIndex + 25
Row10 = ComboRows.ListIndex + 10
UpgradeFrequence = SliderUpgrade.Value
StartLevel = ComboLevel.ListIndex + 1
Unload Form2
GeneralNewGame LastRow, LastCol
End Sub
Private Sub Command1_Click()
Unload Me
If LastRow <> 0 Then
With Form1
Form1.Timer1.Interval = 1
Form1.CmdPause.Caption = "暂停(&P)"
.CmdLeft.Enabled = True
.CmdRight.Enabled = True
.CmdRevert.Enabled = True
.CmdDown.Enabled = True
End With
End If
End Sub
Private Sub Form_Load()
Dim i As Integer, j As Integer
For i = 20 To 30
ComboCols.AddItem i
Next
For i = 0 To 8
ComboLevel.AddItem i + 1
Next i
For i = 10 To 20
ComboRows.AddItem i
Next
ComboRows.ListIndex = Row10 - 10
ComboCols.ListIndex = Col20 - 25
ComboLevel.ListIndex = MyLevel - 1
For i = 1 To 26
For j = 0 To 4
combosetting(j).AddItem Chr(i + 64)
Next j
Next i
For i = 0 To 4
For j = 0 To 9
combosetting(i).AddItem j
Next j
combosetting(i).AddItem "Left"
combosetting(i).AddItem "Up"
combosetting(i).AddItem "Right"
combosetting(i).AddItem "Down"
combosetting(i).AddItem "Space"
combosetting(i).AddItem "Enter"
For j = 0 To 9
combosetting(i).AddItem "NumPad" & j
Next j
Next i
combosetting(0).ListIndex = GetKey(vbMoveLeft)
combosetting(1).ListIndex = GetKey(vbMoveRight)
combosetting(2).ListIndex = GetKey(vbMoveDown)
combosetting(3).ListIndex = GetKey(vbRevert)
combosetting(4).ListIndex = GetKey(vbStepDown)
SliderUpgrade.Value = UpgradeFrequence
'CmdDefault_Click
LabelPreView.BackColor = Form1.Picture1.BackColor
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Picture1.BackColor = LabelPreView.BackColor
Form1.Picture2.BackColor = LabelPreView.BackColor
End Sub
Private Sub LabelPreView_Click()
ChangColor
End Sub
Private Sub ChangColor()
CommonDlg.ShowColor
LabelPreView.BackColor = CommonDlg.Color
End Sub
Private Sub SliderUpgrade_Change()
SliderUpgrade.ToolTipText = SliderUpgrade.Value & "分"
End Sub
Private Sub SliderUpgrade_Click()
'SliderUpgrade.ToolTipText = SliderUpgrade.Value & "分"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -