📄 shift.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "判断Shift键"
ClientHeight = 1830
ClientLeft = 60
ClientTop = 345
ClientWidth = 3405
LinkTopic = "Form1"
ScaleHeight = 1830
ScaleWidth = 3405
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 1
Left = 1200
Top = 1200
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal VKEY As Long) As Integer
Private Sub Timer1_Timer()
Dim longShift As Long
longShift = GetAsyncKeyState(vbKeyShift)
If longShift <> 0 Then MsgBox "Shift键被按下"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -