永发信息网

vb实时错误453 高手看一下哪有错

答案:3  悬赏:50  手机版
解决时间 2021-03-17 01:14
  • 提问者网友:战魂
  • 2021-03-16 15:20
vb实时错误453 高手看一下哪有错
最佳答案
  • 五星知识达人网友:woshuo
  • 2021-03-16 15:56
Private Declare Function 设置坐标 Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwflag As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwextrainfo As Long)
Private Const mouseeventf_leftdown = &H2
Private Const mouseeventf_leftup = &H4
Private Sub Command1_Click()
设置坐标 500, 500
mouse_event mouseeventf_leftdown, 0, 0, 0, 0
mouse_event mouseeventf_leftup, 0, 0, 0, 0
End Sub
全部回答
  • 1楼网友:行路难
  • 2021-03-16 18:23
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
改一下声明的大小写就可以了
  • 2楼网友:醉吻情书
  • 2021-03-16 17:19
把user32.dll 复制到system32目录下,.,,然后下面这样改.

Private Declare Function setcursorpos Lib "user32.dll" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32.dll" (ByVal dwflag As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwextrainfo As Long)
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯