📄 form4.frm
字号:
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 6
Left = 3600
TabIndex = 2
Top = 480
Width = 1995
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "迷"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 5
Left = 2760
TabIndex = 15
Top = 480
Width = 300
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "步"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 4
Left = 2760
TabIndex = 14
Top = 2160
Width = 300
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "秒"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 3
Left = 2760
TabIndex = 13
Top = 1320
Width = 300
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "步数(&S):"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 2
Left = 360
TabIndex = 6
Top = 2160
Width = 1395
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "时间(&T):"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 1
Left = 360
TabIndex = 4
Top = 1320
Width = 1395
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "&N 迷问题:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 285
Index = 0
Left = 225
TabIndex = 0
Top = 480
Width = 1530
End
End
Attribute VB_Name = "ChallengeForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit '强制显式声明模块中的所有变量
Public my_OptCheck As Boolean '判断选择的是:是,还是:否
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0 '确定
If Val(Text1(0).Text) = 0 Then
MsgBox "时间不能为0或为空", vbCritical, "警告"
Text1(0).SetFocus
Exit Sub
ElseIf Val(Text1(1).Text) = 0 Then
MsgBox "步数不能为0或为空", vbCritical, "警告"
Text1(1).SetFocus
Exit Sub
End If
MainForm.my_Ext = True '按下"确定"按钮
MainForm.my_Level = Combo1.Text '等级--N迷
MainForm.LEDTime.Value = Val(Text1(0).Text) '时间
MainForm.maxcount = Val(Text1(1).Text) '步数
Select Case Combo2.ListIndex
Case 0 '图形 1
MainForm.my_Path = ".\Picture\Image\Sunset\"
MainForm.my_Path = MainForm.my_Path & MainForm.my_Level & "\"
Case 1 '图形 2
MainForm.my_Path = ".\Picture\Image\Sunset\"
MainForm.my_Path = MainForm.my_Path & MainForm.my_Level & "\"
Case 2 '数字 1
MainForm.my_Path = ".\Picture\Number\Purple\"
Case 3 '数字 2
MainForm.my_Path = ".\Picture\Number\Purple\"
End Select
If Option1(0).Value Then '加载图片
MainForm.FinalImg.Picture = LoadPicture(MainForm.my_Path & MainForm.my_Level & " puzzle.jpg")
my_OptCheck = True
Else '不加载图片
MainForm.FinalImg.Picture = LoadPicture()
MainForm.Other(40).Enabled = False
my_OptCheck = False
End If
Case 1 '取消
MainForm.my_Ext = False '未按下"确定"按钮
End Select
Unload Me
End Sub
Private Sub Form_Load()
WindowsXPC1.InitSubClassing '初始化控件
Combo1.AddItem " 3"
Combo1.AddItem " 8"
Combo1.AddItem "15"
Combo1.AddItem "24"
Combo1.AddItem "35"
Combo1.ListIndex = 2
Combo2.AddItem "图形 1"
Combo2.AddItem "图形 2"
Combo2.AddItem "数字 1"
Combo2.AddItem "数字 2"
Combo2.ListIndex = 2
End Sub
Private Sub Text1_GotFocus(Index As Integer) '全选文本框内的内容
Text1(Index).SelStart = 0
Text1(Index).SelLength = Len(Text1(Index).Text)
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) And KeyAscii <> 8 Then KeyAscii = 0 '只允许输入数字
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -