16,554
社区成员
发帖
与我相关
我的任务
分享
Public Class Form1
Private Declare Function SetCursorPos Lib "User32" (ByVal x As Integer, ByVal y As Integer) As Boolean
Private intX As Integer = 0
Private intY As Integer = 0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SetCursorPos(100, 100)
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
intY += 10
intX += 10
SetCursorPos(intX, intY)
End Sub
End Class