📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "限制鼠标移动区域"
ClientHeight = 1965
ClientLeft = 60
ClientTop = 345
ClientWidth = 5415
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 1965
ScaleWidth = 5415
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
Caption = "退出"
Height = 450
Left = 1605
TabIndex = 2
Top = 1380
Width = 2205
End
Begin VB.CommandButton Command2
Caption = "解除"
Height = 450
Left = 1605
TabIndex = 1
Top = 750
Width = 2205
End
Begin VB.CommandButton Command1
Caption = "限制鼠标"
Height = 450
Left = 1605
TabIndex = 0
Top = 135
Width = 2205
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 Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Private Type RECT '用户自定义类型
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Dim mouse As RECT
Private Sub Command1_Click()
mouse.Left = Me.Left / Screen.TwipsPerPixelX
mouse.Top = Me.Top / Screen.TwipsPerPixelY
mouse.Right = (Me.Left + Me.Width) / Screen.TwipsPerPixelX
mouse.Bottom = (Me.Top + Me.Height) / Screen.TwipsPerPixelY
ClipCursor mouse
End Sub
Private Sub Command2_Click()
mouse.Left = 0
mouse.Top = 0
mouse.Right = (Screen.Width) / Screen.TwipsPerPixelX
mouse.Bottom = (Screen.Height) / Screen.TwipsPerPixelY
ClipCursor mouse
End Sub
Private Sub Command3_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -