当前位置导航:炫浪网>>网络学院>>网页制作>>ASP.NET教程

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&
--------------------------------------------------------------------------------------------------------------------------------------------------------
点击给我留言
--------------------------------------------------------------------------------------------------------------------------------------------------------
相关内容
赞助商链接