📄 vb--
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form Form1
Caption = "鼠标右键菜单设计"
ClientHeight = 2475
ClientLeft = 225
ClientTop = 555
ClientWidth = 5625
LinkTopic = "Form1"
ScaleHeight = 2475
ScaleWidth = 5625
StartUpPosition = 3 '窗口缺省
Begin RichTextLib.RichTextBox RichTextBox1
Height = 2295
Left = 120
TabIndex = 0
Top = 0
Width = 5175
_ExtentX = 9128
_ExtentY = 4048
_Version = 393217
Enabled = -1 'True
TextRTF = $"Mouse-RightButton-Menu.frx":0000
End
Begin VB.Menu MouseRightButton
Caption = "鼠标右键"
Visible = 0 'False
Begin VB.Menu copy
Caption = "复制"
End
Begin VB.Menu paste
Caption = "粘贴"
End
Begin VB.Menu cut
Caption = "剪切"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'---------------------------------------------------------------------------
' VB 鼠标右键菜单设计
'
'---------------------------------------------------------------------------
'设计步骤:
' 详细设计步骤看【ReadMe-设计步骤.doc】
'---------------------------------------------------------------------------
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_COPY = &H301
Private Const WM_CUT = &H300
Private Const WM_PASTE = &H302
Private Sub copy_Click()
SendMessage RichTextBox1.hwnd, WM_COPY, 0, 0
End Sub
Private Sub cut_Click()
SendMessage RichTextBox1.hwnd, WM_CUT, 0, 0
End Sub
Private Sub paste_Click()
SendMessage RichTextBox1.hwnd, WM_PASTE, 0, 0
End Sub
Private Sub Form_Load()
RichTextBox1.Text = "详细设计步骤看【ReadMe-设计步骤.doc】"
End Sub
Private Sub RichTextBox1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbRightButton Then
PopupMenu MouseRightButton
End If
End Sub
Private Sub StatusBar1_PanelClick(ByVal Panel As ComctlLib.Panel)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -