⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textmenu.frm

📁 屏蔽VB的TEXT控件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form textmenu 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "控制是否取消 TextBox  的右键菜单(popupmenu)"
   ClientHeight    =   1275
   ClientLeft      =   3000
   ClientTop       =   1845
   ClientWidth     =   5025
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1275
   ScaleWidth      =   5025
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   375
      Left            =   3480
      TabIndex        =   2
      Top             =   600
      Width           =   1245
   End
   Begin VB.CheckBox Check1 
      Caption         =   "保留 TextBox  的右键菜单"
      Height          =   255
      Left            =   390
      TabIndex        =   1
      Top             =   300
      Value           =   1  'Checked
      Width           =   2385
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   390
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   660
      Width           =   2865
   End
End
Attribute VB_Name = "textmenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
  If Check1 = 0 Then
     OldProc = GetWindowLong(Text1.hWnd, GWL_WNDPROC)
     SetWindowLong Text1.hWnd, GWL_WNDPROC, AddressOf TextWndProc
  Else
     SetWindowLong Text1.hWnd, GWL_WNDPROC, OldProc
  End If
End Sub

Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
    If Check1 = 0 Then
        SetWindowLong Text1.hWnd, GWL_WNDPROC, OldProc
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -