vb.net 鼠标控制

页面导航:首页 > 软件编程 > vb.net > vb.net 鼠标控制

vb.net 鼠标控制

来源: 作者: 时间:2016-01-15 15:10 【

Public Class Form1 Public Declare Sub mouse_event Lib user32 Alias mouse_event (ByVal dwFlags As Long) #39;LEFTDOWN = H2 #39;LEFTUP = H4 #39;R...
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

 

Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<