📄 mousemov.frm
字号:
VERSION 5.00
Object = "{75D4F50D-8785-11D3-93AD-0000832EF44D}#2.0#0"; "FAST2010.ocx"
Begin VB.Form frmMouse
BorderStyle = 3 'Fixed Dialog
Caption = "Mouse operations"
ClientHeight = 2970
ClientLeft = 1125
ClientTop = 1500
ClientWidth = 5850
Icon = "Mousemov.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 2970
ScaleWidth = 5850
ShowInTaskbar = 0 'False
Begin VB.Timer timTimer
Interval = 10
Left = 90
Top = 225
End
Begin VB.CommandButton cmdDisable
Caption = "Click me to disable restrictions..."
Height = 1050
Left = 1485
Picture = "Mousemov.frx":0442
Style = 1 'Graphical
TabIndex = 2
Top = 180
Width = 2940
End
Begin VB.CommandButton Command2
Caption = "Restrict to Form"
Height = 375
Left = 3135
TabIndex = 1
Top = 1485
Width = 2415
End
Begin VB.CommandButton Command1
Caption = "Restrict to Command Button"
Height = 375
Left = 255
TabIndex = 0
Top = 1485
Width = 2415
End
Begin FLWHardware.FWMouse objMouse
Left = 330
Top = 840
_ExtentX = 820
_ExtentY = 820
End
Begin VB.Label lblPosition
AutoSize = -1 'True
Caption = "x"
Height = 195
Left = 315
TabIndex = 5
Top = 2565
Width = 75
End
Begin VB.Label lblDblClickTime
AutoSize = -1 'True
Caption = "x"
Height = 195
Left = 315
TabIndex = 4
Top = 2025
Width = 75
End
Begin VB.Label lblButtons
AutoSize = -1 'True
Caption = "x"
Height = 195
Left = 315
TabIndex = 3
Top = 2295
Width = 75
End
End
Attribute VB_Name = "frmMouse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdDisable_Click()
Call objMouse.RemoveSnap
cmdDisable.Enabled = False
End Sub
Private Sub Command1_Click()
Call objMouse.SnapTo(cmdDisable.hWnd, False)
Call objMouse.CenterOn(cmdDisable.hWnd, False)
cmdDisable.Enabled = True
End Sub
Private Sub Command2_Click()
Call objMouse.SnapTo(Me.hWnd, True)
Call objMouse.CenterOn(Me.hWnd, True)
cmdDisable.Enabled = True
End Sub
Private Sub Form_Load()
cmdDisable.Enabled = False
lblButtons = "Mouse has " & objMouse.Buttons & " buttons"
lblDblClickTime = "Double click time is " & objMouse.DoubleClickTime & "ms"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call objMouse.RemoveSnap
End Sub
Private Sub timTimer_Timer()
Me.lblPosition = "Mouse is on " & objMouse.x & ":" & objMouse.y
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -