截获鼠标消息.frm

来自「个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助」· FRM 代码 · 共 44 行

FRM
44 行
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "监测鼠标的消息"
   ClientHeight    =   2640
   ClientLeft      =   1650
   ClientTop       =   1530
   ClientWidth     =   4050
   LinkTopic       =   "Form1"
   ScaleHeight     =   2640
   ScaleWidth      =   4050
   Begin VB.ListBox List1 
      Height          =   1815
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   3015
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "鼠标消息:"
      Height          =   180
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   816
   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 Sub Form_Load()
    prevWndProc = GetWindowLong(Me.hWnd, GWL_WNDPROC)
    SetWindowLong Me.hWnd, GWL_WNDPROC, AddressOf WndProc
End Sub

Private Sub Form_Unload(Cancel As Integer)
    SetWindowLong Me.hWnd, GWL_WNDPROC, prevWndProc
End Sub

⌨️ 快捷键说明

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