VB mouse_event参数不可选 想做一个控制鼠标的程序 但是 mouse_ 30
VBmouse_event参数不可选想做一个控制鼠标的程序但是mouse_event参数不可选怎么回事?我用的企业版PrivateDeclareFunctionsetcu...
VB mouse_event参数不可选 想做一个控制鼠标的程序 但是 mouse_event参数不可选怎么回事? 我用的企业版
Private Declare Function setcursorpos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "use32" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwextralnfo As Long)
Private Const mouseeventf_leftdown = &H2
Private Const mouseeventf_leftup = &H4
Private Sub Command1_Click()
setcursorpos 100, 110 'x1,y1
mouse_event 这里提示参数不可选
mouseeventf_leftdown , 0, 0, 0, 0
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 3000
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
setcursorpos 200, 210 'x2,y2
mouse_event mouseeventf_leftup, 0, 0, 0, 0
Timer1.Enabled = False
End Sub 展开
Private Declare Function setcursorpos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "use32" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwextralnfo As Long)
Private Const mouseeventf_leftdown = &H2
Private Const mouseeventf_leftup = &H4
Private Sub Command1_Click()
setcursorpos 100, 110 'x1,y1
mouse_event 这里提示参数不可选
mouseeventf_leftdown , 0, 0, 0, 0
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 3000
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
setcursorpos 200, 210 'x2,y2
mouse_event mouseeventf_leftup, 0, 0, 0, 0
Timer1.Enabled = False
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询