vb 在指定位置自动点击鼠标
如图,我想让我的vb程序自动右键点击这个时间栏,然后弹出一个菜单。请问怎么做啊?高手来啊!财富值我不吝啬,到时候再给200....
如图,我想让我的vb程序自动右键点击这个时间栏,然后弹出一个菜单。请问怎么做啊?
高手来啊!财富值我不吝啬,到时候再给200. 展开
高手来啊!财富值我不吝啬,到时候再给200. 展开
展开全部
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)Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal y As Long) As Long
Private Sub Command1_Click()
SetCursorPos Screen.Width / Screen.TwipsPerPixelX - 40, Screen.Height / Screen.TwipsPerPixelY - 10 '设置鼠标位置
mouse_event &H2, 0&, 0&, 0&, 0& '鼠标左键按下
mouse_event &H4, 0&, 0&, 0&, 0& '鼠标左键弹起
End Sub
Private Sub Command1_Click()
SetCursorPos Screen.Width / Screen.TwipsPerPixelX - 40, Screen.Height / Screen.TwipsPerPixelY - 10 '设置鼠标位置
mouse_event &H2, 0&, 0&, 0&, 0& '鼠标左键按下
mouse_event &H4, 0&, 0&, 0&, 0& '鼠标左键弹起
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询