📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "获取鼠标任意点上的位置"
ClientHeight = 1680
ClientLeft = 60
ClientTop = 345
ClientWidth = 4215
LinkTopic = "Form1"
ScaleHeight = 1680
ScaleWidth = 4215
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command1
Caption = "退出"
Height = 405
Left = 1050
TabIndex = 2
Top = 1080
Width = 2205
End
Begin VB.Timer Timer1
Interval = 50
Left = 135
Top = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "鼠标当前位置"
Height = 435
Left = 180
TabIndex = 1
Top = 435
Width = 1155
End
Begin VB.Label label2
Alignment = 2 'Center
Height = 300
Left = 1395
TabIndex = 0
Top = 405
Width = 2640
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Timer1_Timer()
Dim P1 As POINTAPI
GetCursorPos P1
label2.Caption = P1.x & "," & P1.y
End Sub
Private Sub Command1_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -