请问vb如何简单的实现模拟鼠标点击屏幕坐标位置
2个回答
展开全部
给你介绍两种方法
1.
mouse_event MOUSEEVENTF_LEFTDOWN
mouse_event MOUSEEVENTF_LEFTUP
2.
SendMessage/PostMessage WM_LBUTTONDOWN
SendMessage/PostMessage WM_LBUTTONUP
自己百度下具体怎么用
1.
mouse_event MOUSEEVENTF_LEFTDOWN
mouse_event MOUSEEVENTF_LEFTUP
2.
SendMessage/PostMessage WM_LBUTTONDOWN
SendMessage/PostMessage WM_LBUTTONUP
自己百度下具体怎么用
更多追问追答
追问
能否给个简单的代码,我在自学,刚学,谢谢
追答
自学的话就必须学会怎么用搜索引擎了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) '
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Call SetCursorPos(200, 100)
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) '
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Call SetCursorPos(200, 100)
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
追问
谢谢 这个了
你好在吗请教个问题
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询