frmgetkey.frm
来自「一款飞机射击游戏的源代码」· FRM 代码 · 共 49 行
FRM
49 行
VERSION 5.00
Begin VB.Form FrmGetKey
BorderStyle = 1 'Fixed Single
Caption = "Key"
ClientHeight = 525
ClientLeft = 3750
ClientTop = 1995
ClientWidth = 1920
ControlBox = 0 'False
Icon = "FrmGetKey.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 35
ScaleMode = 3 'Pixel
ScaleWidth = 128
StartUpPosition = 2 '屏幕中心
Begin VB.Label LblCap
Height = 375
Left = 120
TabIndex = 0
Top = 0
Width = 1695
End
End
Attribute VB_Name = "FrmGetKey"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then Unload Me: Exit Sub
CurOption.KeyP(FrmOption.CurOpPlayer, FrmOption.CurCmdCtrl) = KeyCode
Unload Me
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 44 Then CurOption.KeyP(FrmOption.CurOpPlayer, FrmOption.CurCmdCtrl) = 44: Unload Me
'
End Sub
Private Sub Form_Load()
LblCap.Caption = "请按键,Esc 取消"
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?