📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2235
ClientLeft = 60
ClientTop = 390
ClientWidth = 4425
LinkTopic = "Form1"
ScaleHeight = 2235
ScaleWidth = 4425
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "走动"
Height = 375
Left = 360
TabIndex = 1
Top = 360
Width = 615
End
Begin VB.Label Label1
Caption = "请按←、→、↑和↓四个方向键让按钮走动"
Height = 255
Left = 480
TabIndex = 0
Top = 1800
Width = 3615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 37
Command1.Left = Command1.Left - 50
Case 38
Command1.Top = Command1.Top - 50
Case 39
Command1.Left = Command1.Left + 50
Case 40
Command1.Top = Command1.Top + 50
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -