📄 dialog.frm
字号:
VERSION 5.00
Begin VB.Form Dialog
BorderStyle = 3 'Fixed Dialog
Caption = "选择地雷数"
ClientHeight = 1110
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 6030
Icon = "Dialog.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1110
ScaleWidth = 6030
ShowInTaskbar = 0 'False
Begin VB.TextBox Text1
Height = 375
Left = 2085
TabIndex = 3
Top = 330
Width = 1860
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 4680
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "确定"
Height = 375
Left = 4680
TabIndex = 0
Top = 120
Width = 1215
End
Begin VB.Label Label1
Caption = "请输入地雷数(50-150):"
Height = 390
Left = 75
TabIndex = 2
Top = 375
Width = 2025
End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dialog.Left = (Screen.Width - Dialog.Width) \ 2
Dialog.Top = (Screen.Height - Dialog.Height) \ 2
RegKey = "HKEY_CURRENT_USER\Software\EliminateMine\ResultArray"
CreateKey RegKey
MineNumMax = GetStringValue(RegKey, "MineNumMax")
Text1.Text = MineNumMax
End Sub
Private Sub OKButton_Click()
MineNumMax = Val(Trim(Text1.Text))
If (MineNumMax < 50 Or MineNumMax > 150) Then
MineNumMax = 100
End If
'Debug.Print MineNumMax
SetStringValue RegKey, "MineNumMax", MineNumMax
BeginGamesp
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -