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

📄 form1.frm

📁 快速控制.管理,?焖倏刂?管理,?焖倏刂?管理,?焖倏刂?管理,
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text1 
      Height          =   2295
      Left            =   120
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   2
      Top             =   120
      Width           =   3855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Stop"
      Height          =   495
      Left            =   1320
      TabIndex        =   1
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Record"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   2520
      Width           =   1215
   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 Command1_Click()
  SetGlbHook
  Command1.Enabled = False
  Command2.Enabled = True
  Text1.Enabled = False
End Sub

Private Sub Command2_Click()
  UnSetGlbHook
  Command1.Enabled = True
  Command2.Enabled = False
  Text1.Enabled = True
End Sub
Public Sub UnSetGlbHook()
  'Removes the hook
  If RemoveHook = False Then MsgBox "no hook or was unable to remove it"
  'removes the text box's input from the WindowProc function
  SetWindowLong Text1.hWnd, GWL_WNDPROC, PrevFuncPointer
End Sub

Public Sub SetGlbHook()
  'Sets the text box's input to the WindowProc function
  PrevFuncPointer = SetWindowLong(Text1.hWnd, GWL_WNDPROC, AddressOf WindowProc)
  'Sets the hook from the dll and passes to the textbox which passes to WindowProc
  If SetHook(Text1.hWnd) = False Then MsgBox "Couldn't hook"
End Sub

Private Sub Form_Load()
  Command1_Click
End Sub

⌨️ 快捷键说明

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