VB在后台客户区移动鼠标到411,640(已经获得的客户区坐标)并左键单击,用PostMessage写 高手请忽谦虚谢
PostMessage(HWNDhWnd,UINTMsg,WPARAMwParam,LPARAMlParam)句柄假设000000就行了后面几个参数请详细的给个注释谢谢是...
PostMessage(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)
句柄 假设000000 就行了 后面几个参数请详细的给个注释谢谢
是后台移动,前台的我知道,也就是选择客户区句柄后 在客户区坐标执行移动点击,另外那几个帖子的方法我试了,均是错贴,都是没经调试的方法,参数使用不明所以!请高手调试一下,用一个游戏试试,反正有窗口就行! 展开
句柄 假设000000 就行了 后面几个参数请详细的给个注释谢谢
是后台移动,前台的我知道,也就是选择客户区句柄后 在客户区坐标执行移动点击,另外那几个帖子的方法我试了,均是错贴,都是没经调试的方法,参数使用不明所以!请高手调试一下,用一个游戏试试,反正有窗口就行! 展开
展开全部
Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
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)
Public Sub MouseEvent(x As Long, y As Long)
Dim p As POINTAPI
SetCursorPos x , y '鼠标移动到x,y
mouse_event 4&, 0&, 0&, 0&, 0& '左键抬起
mouse_event 2&, 0&, 0&, 0&, 0& '左键按下
mouse_event 4&, 0&, 0&, 0&, 0& '左键抬起
End Sub
'调用时:call MouseEvent 411,640
如果非要用PostMessage请参考:
http://zhidao.baidu.com/question/52631998.html
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)
Public Sub MouseEvent(x As Long, y As Long)
Dim p As POINTAPI
SetCursorPos x , y '鼠标移动到x,y
mouse_event 4&, 0&, 0&, 0&, 0& '左键抬起
mouse_event 2&, 0&, 0&, 0&, 0& '左键按下
mouse_event 4&, 0&, 0&, 0&, 0& '左键抬起
End Sub
'调用时:call MouseEvent 411,640
如果非要用PostMessage请参考:
http://zhidao.baidu.com/question/52631998.html
参考资料: http://zhidao.baidu.com/question/52631998.html
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询