📄 pro_5_02.frm
字号:
VERSION 5.00
Begin VB.Form Form2
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Dialog
Caption = "Form2"
ClientHeight = 2775
ClientLeft = 45
ClientTop = 330
ClientWidth = 4500
Icon = "pro_5_02.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2775
ScaleWidth = 4500
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Cancel = -1 'True
Caption = "取消"
Height = 315
Index = 1
Left = 3300
TabIndex = 3
Top = 2160
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 315
Index = 0
Left = 2400
TabIndex = 2
Top = 2160
Width = 855
End
Begin VB.Frame Frame1
BackColor = &H00C0C0C0&
Caption = "设置快捷键"
Height = 1695
Left = 420
TabIndex = 0
Top = 240
Width = 3735
Begin VB.CheckBox Check2
Caption = "快揭键有效"
Height = 315
Left = 1440
TabIndex = 7
Top = 420
Width = 1755
End
Begin VB.CheckBox Check1
Caption = "Shift"
Height = 255
Index = 2
Left = 2460
TabIndex = 6
Top = 1020
Width = 1035
End
Begin VB.CheckBox Check1
Caption = "Alt"
Height = 255
Index = 1
Left = 1440
TabIndex = 5
Top = 1020
Width = 1035
End
Begin VB.CheckBox Check1
Caption = "Ctrl"
Height = 255
Index = 0
Left = 360
TabIndex = 4
Top = 1020
Width = 1035
End
Begin VB.ComboBox Combo1
Height = 300
Left = 300
Style = 2 'Dropdown List
TabIndex = 1
Top = 420
Width = 915
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private isALT As Byte
Private isCONTROL As Byte
Private isSHIFT As Byte
Private Sub Command1_Click(Index As Integer)
If Index = 0 Then
If Check2.Value = 1 Then
HotKey = 0
If Check1(0).Value = 1 Then HotKey = HotKey Or HOTKEYF_CONTROL
If Check1(1).Value = 1 Then HotKey = HotKey Or HOTKEYF_ALT
If Check1(2).Value = 1 Then HotKey = HotKey Or HOTKEYF_SHIFT
HotKey_Cild = Asc(Combo1.Text)
Else
HotKey = 0
End If
End If
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
Move (Screen.Width - Form2.Width) \ 2, (Screen.Height - Form2.Height) \ 2
Combo1.Clear
For i = 48 To 57
Combo1.AddItem Chr(i)
Next
For i = 65 To 90
Combo1.AddItem Chr(i)
Next
If HotKey = 0 Then
Combo1.ListIndex = 0
Else
Check2.Value = 1
Combo1.Text = Chr(HotKey_Cild)
If HotKey And HOTKEYF_CONTROL Then Check1(0).Value = 1
If HotKey And HOTKEYF_ALT Then Check1(1).Value = 1
If HotKey And HOTKEYF_SHIFT Then Check1(2).Value = 1
End If
Call SetWindowWord(hwnd, GWL_HWNDPARENT, Form1.hwnd)
Form1.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -