Public Class Form1
    Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long)
    'LEFTDOWN = &H2
    'LEFTUP = &H4
    'RIGHTDOWN = &H8
    'RIGHTUP = &H10
    'MIDDLEUP = &H40
    'MIDDLEDOWN = &H20
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Cursor = New Cursor(Cursor.Current.Handle)
        Cursor.Position = New Point(150, 150)
        mouse_event(&H2)
        Cursor.Position = New Point(250, 250)
        mouse_event(&H4)
        Cursor.Position = New Point(250, 250)
        mouse_event(&H8)
        Cursor.Position = New Point(350, 350)
        mouse_event(&H10)
    End Sub
End Class


 

 

相关文章:

  • 2018-06-20
  • 2021-11-01
  • 2021-07-13
  • 2021-08-22
  • 2022-02-02
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-02-05
  • 2021-10-25
  • 2021-05-22
  • 2021-12-26
  • 2021-09-06
相关资源
相似解决方案