InPowerS.Net

 找回密碼
 註冊
搜索
查看: 1832|回復: 1

隱藏滑鼠移動

[複製鏈接]
發表於 2008-12-25 22:59:35 | 顯示全部樓層 |閱讀模式
隱藏滑鼠移動
Private Structure POINTAPI
        Dim x As Integer
        Dim y As Integer
    End Structure
    Private Structure RECT
        Dim Left As Integer
        Dim Top As Integer
        Dim Right As Integer
        Dim Bottom As Integer
    End Structure
    Private Structure WINDOWPLACEMENT
        Dim Length As Integer
        Dim flags As Integer
        Dim showCmd As Integer
        Dim ptMinPosition As POINTAPI
        Dim ptMaxPosition As POINTAPI
        Dim rcNormalPosition As RECT
    End Structure
    Private Declare Function GetWindowPlacement Lib "user32" (ByRef hwnd As Integer, ByRef lpwndpl As WINDOWPLACEMENT) As Integer
    Private Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As Long
    Dim po As POINTAPI 'po點擊前滑鼠位置
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        GetCursorPos(po)
        Call SetCursorPos(0, 100) '滑鼠移動到螢幕座標 X,Y(單位是圖元
        mouse_event(MOUSEEVENTF_ABSOLUTE Or MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
        System.Threading.Thread.Sleep(200)
        mouse_event(MOUSEEVENTF_ABSOLUTE Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
        SetCursorPos(po.x, po.y)
    End Sub
發表於 2009-4-7 04:25:11 | 顯示全部樓層
大大可以請教一下嗎
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

小黑屋|Archiver|手機版|InPowerS.Net

GMT+8, 2018-10-19 23:40

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回復 返回頂部 返回列表