📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form aa
BackColor = &H00E0E0E0&
Caption = "计算机"
ClientHeight = 2610
ClientLeft = 60
ClientTop = 345
ClientWidth = 4800
FillColor = &H00C0C0C0&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2610
ScaleWidth = 4800
StartUpPosition = 2 '屏幕中心
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 240
Left = 1200
TabIndex = 0
Top = 2160
Width = 120
End
Begin VB.Image Image2
Height = 495
Left = 2520
Picture = "Form1.frx":000C
Stretch = -1 'True
Top = 600
Width = 735
End
Begin VB.Image Image1
Height = 615
Left = 960
Picture = "Form1.frx":3B58
Stretch = -1 'True
Top = 960
Width = 855
End
End
Attribute VB_Name = "aa"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
Dim KEY_count As Integer
'##################################################################
'## 过程名称:Form_KeyDown
'## 参数:KeyCode 为Integer型
'## 参数:Shift 为Integer型
'##################################################################
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
KEY_count = KEY_count + 1
Select Case KeyCode
Case 37
Image2.Left = Image2.Left - 200
Case 38
Image2.Top = Image2.Top - 200
Case 39
Image2.Left = Image2.Left + 200
Case 40
Image2.Top = Image2.Top + 200
End Select
If Abs(Image1.Left - Image2.Left) < 300 And Abs(Image1.Top - Image2.Top) < 320 Then
Label1 = "我按键" & KEY_count & "次追到一颗红心"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -