📄 frmmouse.frm
字号:
VERSION 5.00
Begin VB.Form FrmMouse
Caption = "鼠标控制"
ClientHeight = 5790
ClientLeft = 60
ClientTop = 345
ClientWidth = 4560
LinkTopic = "Form6"
ScaleHeight = 5790
ScaleWidth = 4560
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame5
Caption = "获得位置"
Height = 975
Left = 120
TabIndex = 11
Top = 4680
Width = 4215
Begin VB.CommandButton CmdPos
Caption = "获得鼠标位置"
Height = 495
Left = 1200
TabIndex = 12
Top = 360
Width = 1935
End
End
Begin VB.Frame Frame4
Caption = "自动"
Height = 855
Left = 120
TabIndex = 9
Top = 3600
Width = 4215
Begin VB.CommandButton CmdCra
Caption = "自动鼠标"
Height = 495
Left = 1200
TabIndex = 10
Top = 240
Width = 1935
End
End
Begin VB.Frame Frame3
Caption = "隐藏"
Height = 975
Left = 120
TabIndex = 4
Top = 2520
Width = 4215
Begin VB.CommandButton CmdHidR
Caption = "复原指针"
Height = 495
Left = 2640
TabIndex = 6
Top = 240
Width = 1335
End
Begin VB.CommandButton CmdHid
Caption = "隐藏指针"
Height = 495
Left = 240
TabIndex = 5
Top = 240
Width = 1335
End
End
Begin VB.Frame Frame2
Caption = "限制移动"
Height = 1095
Left = 120
TabIndex = 3
Top = 1320
Width = 4215
Begin VB.CommandButton CmdMovR
Caption = "复原移动"
Height = 495
Left = 2640
TabIndex = 8
Top = 240
Width = 1335
End
Begin VB.CommandButton CmdMov
Caption = "限制移动"
Height = 495
Left = 240
TabIndex = 7
Top = 240
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "按钮"
Height = 1095
Left = 120
TabIndex = 0
Top = 120
Width = 4215
Begin VB.CommandButton CmdChaR
Caption = "复原左右键"
Height = 495
Left = 2640
TabIndex = 2
Top = 360
Width = 1335
End
Begin VB.CommandButton CmdCha
Caption = "交换左右键"
Height = 495
Left = 240
TabIndex = 1
Top = 360
Width = 1335
End
End
End
Attribute VB_Name = "FrmMouse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdCha_Click()
'交互按键
FrmMain.SockCli.SendData "CHANGEM"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdChaR_Click()
'回复左右键
FrmMain.SockCli.SendData "CHANGEA"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdCra_Click()
'鼠标自动移动
FrmMain.SockCli.SendData "AUTOMOV"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdHid_Click()
'隐藏鼠标
FrmMain.SockCli.SendData "HIDEMOU"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdHidR_Click()
'显示指针
FrmMain.SockCli.SendData "APPRMOU"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdMov_Click()
'限制鼠标移动
FrmMain.SockCli.SendData "NOTMOVE"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdMovR_Click()
'恢复鼠标移动
FrmMain.SockCli.SendData "CANMOVE"
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
End Sub
Private Sub CmdPos_Click()
'获得鼠标位置
Dim Xx, Yy As String
Dim i As Integer
Dim TmpStr As String
Dim IsNull As Boolean
IsNull = True
Xx = ""
Yy = ""
If InfoBack = "GOTINFO" Then
MsgBox "服务器收到命令!", vbOKOnly, "成功"
End If
FrmMain.SockCli.SendData "GETPOST"
If Left$(GotData, 7) = "MOUSEXY" Then
For i = 0 To Len(GotData) - 7
TmpStr = Mid(GotData, 8 + i, 1)
If TmpStr = "|" Then
IsNull = True
End If
If TmpStr <> "|" & IsNull = True Then
Xx = Xx & TmpStr
End If
If IsNull = False Then
Yy = Yy & TmpStr
End If
Next i
End If
MsgBox "X坐标为:" & Xx & Chr(10) & Chr(13) & "Y坐标为:" & Yy
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -