国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

VB 從零開始編外掛(五)

2024-07-21 02:20:40
字體:
來源:轉載
供稿:網友
前邊談了模擬鍵盤,下面說說模擬鼠標。
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要vb api函數:
mouse_event ←模擬一次鼠標事件
--------------------------------------------------------------------------------------------------------------------------------------------------------
相關api聲明:
mouse_event

private declare sub mouse_event lib "user32" ( byval dwflags as long, byval dx as long, byval dy as long, byval cbuttons as long, byval dwextrainfo as long )
--------------------------------------------------------------------------------------------------------------------------------------------------------
定義變量:
const mouseeventf_leftdown = &h2
const mouseeventf_leftup = &h4
const mouseeventf_middledown = &h20
const mouseeventf_middleup = &h40
const mouseeventf_move = &h1
const mouseeventf_absolute = &h8000
const mouseeventf_rightdown = &h8
const mouseeventf_rightup = &h10
--------------------------------------------------------------------------------------------------------------------------------------------------------
mouseeventf_leftdown'鼠標左鍵按下
mouseeventf_leftup'鼠標松開
mouseeventf_rightdown '鼠標右鍵按下
mouseeventf_rightup'鼠標右鍵松開
--------------------------------------------------------------------------------------------------------------------------------------------------------
代碼:
private declare sub mouse_event lib "user32" ( byval dwflags as long, byval dx as long, byval dy as long, byval cbuttons as long, byval dwextrainfo as long )
const mouseeventf_leftdown = &h2
const mouseeventf_leftup = &h4
const mouseeventf_middledown = &h20
const mouseeventf_middleup = &h40
const mouseeventf_move = &h1
const mouseeventf_absolute = &h8000
const mouseeventf_rightdown = &h8
const mouseeventf_rightup = &h10
'這里是 鼠標左鍵按下 和松開兩個事件的組合即一次單擊
mouse_event mouseeventf_leftdown or mouseeventf_leftup, 0, 0, 0, 0
'模擬鼠標右鍵單擊事件
mouse_event mouseeventf_rightdown or mouseeventf_rightup, 0, 0, 0, 0
'兩次連續的鼠標左鍵單擊事件 構成一次鼠標雙擊事件
mouse_event mouseeventf_leftdown or mouseeventf_leftup, 0, 0, 0, 0
mouse_event mouseeventf_leftdown or mouseeventf_leftup, 0, 0, 0, 0
  • 本文來源于網頁設計愛好者web開發社區http://www.html.org.cn收集整理,歡迎訪問。
  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 莲花县| 苏州市| 寿光市| 莫力| 湖口县| 武安市| 通州市| 岳池县| 黑河市| 桦南县| 鄂伦春自治旗| 即墨市| 尚义县| 上虞市| 竹山县| 弥勒县| 麟游县| 高雄县| 汉沽区| 饶阳县| 都匀市| 晋宁县| 浠水县| 娄底市| 博爱县| 图们市| 迁安市| 萨迦县| 内江市| 内丘县| 昌乐县| 秭归县| 扶风县| 莎车县| 富锦市| 白河县| 商水县| 确山县| 精河县| 潼关县| 吉木乃县|