VB 从零开始编外挂(三)

时间:2009-02-02 07:34:25  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:--------------------- 需要VB API函数: keybd_event ←函数模拟了键盘行动 -------------------------------------------------------------------------------------------------------------------------------------------------------- 相关API声明: keybd_event ↓ Private Declare Sub keybd_event Lib "user32" (...
  正文:vb 从零开始编外挂(三)
躲避了NP的扫描现在就可以模拟了!
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要VB API函数:
keybd_event ←函数模拟了键盘行动
--------------------------------------------------------------------------------------------------------------------------------------------------------
相关API声明:
keybd_event

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal Scan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要的控件:Timer(interval不为空)
--------------------------------------------------------------------------------------------------------------------------------------------------------
代码
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal Scan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Timer1_Timer()
Call keybd_event(82, 0, 0, 0) '模拟按下"R"键
End Sub
--------------------------------------------------------------------------------------------------------------------------------------------------------
其它模拟:
方法一:
AppActivate sTitle
SendKeys "5"
方法二:
AppActivate sTitle
SendKeys vbKey5
方法三:
SendMessage Hwnd, WM_KEYDOWN, vbKey5, 0&
SendMessage Hwnd, WM_KEYUP, vbKey5, 0&
方法四:
AppActivate sTitle
keybd_event 53, 0, 0, 0
keybd_event 53, 0, KEYEVENTF_KEYUP, 0
方法五:
PostMessage lHwnd, WM_KEYDOWN, vbKey5, 0&
PostMessage lHwnd, WM_KEYUP, vbKey5, 0&

VB 从零开始编外挂(三)》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Language/VB/2009-02-02/8922.html


关键字:

关于《VB 从零开始编外挂(三)》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td