📄 form1.frm
字号:
VERSION 4.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2730
ClientLeft = 1140
ClientTop = 1515
ClientWidth = 3825
Height = 3135
Left = 1080
LinkTopic = "Form1"
ScaleHeight = 2730
ScaleWidth = 3825
Top = 1170
Width = 3945
Begin VB.Label Label1
Caption = "Press the right mouse button below for the popup menu"
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 3615
End
Begin VB.Menu mnuPopup
Caption = "Popup Menu"
Visible = 0 'False
Begin VB.Menu mnuChoice1
Caption = "Choice &1"
End
Begin VB.Menu mnuChoice2
Caption = "Choice &2"
End
Begin VB.Menu mnuChoice3
Caption = "Choice &3"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Make sure it's the right button.
If Button And vbRightButton _
Then PopupMenu mnuPopup
End Sub
Private Sub mnuChoice1_Click()
MsgBox "Choice 1"
End Sub
Private Sub mnuChoice2_Click()
MsgBox "Choice 2"
End Sub
Private Sub mnuChoice3_Click()
MsgBox "Choice 3"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -