VB实现的《QQ美女找茬游戏》作弊器实例
本文实例讲述了VB实现的《QQ美女找茬游戏》作弊器。分享给大家供大家参考。具体如下:
比较无聊哈,原理很简单,用VB速度比较慢,但是实现很容易。
Option Explicit Private Type sPOINT x As Long y As Long End Type Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Const HWND_TOPMOST& = -1 ' 将窗口置于列表顶部,并位于任何最顶部窗口的前面 Private Const SWP_NOSIZE& = &H1 ' 保持窗口大小 Private Const SWP_NOMOVE& = &H2 ' 保持窗口位置 Private Sub Form_Load() SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE ' 将窗口设为总在最前 End Sub '把long型的RGB值分解成3个分量 Sub ColorRGB(Color As Long, C() As Integer) Const ByN As Integer = 256 Const ByN2 As Long = 65536 C(1) = (Color Mod ByN) C(2) = ((Color Mod ByN2) \ ByN) C(3) = (Color \ ByN2) End Sub Private Sub GetPoint() Dim p1(497, 447) As Long, p2(497, 447) As Long, C1(3) As Integer, C2(3) As Integer '数组大小匹配于图片的大小 Dim pic1 As sPOINT, pic2 As sPOINT '设置两张图片的屏幕位置 pic1.x = 8 pic1.y = 192 pic2.x = 517 pic2.y = 192 Dim h As Long, hD As Long, r As Long, i As Integer, j As Integer hD = GetDC(0) '读入两张图片 For i = 0 To 497 For j = 0 To 447 p1(i, j) = GetPixel(hD, i + pic1.x, j + pic1.y) p2(i, j) = GetPixel(hD, i + pic2.x, j + pic2.y) Next Next '对比,标记差异 Dim t As Boolean t = True For i = 0 To 497 For j = 0 To 447 Call ColorRGB(p1(i, j), C1()) Call ColorRGB(p2(i, j), C2()) If (Abs(C1(1) - C2(1)) > 30 Or Abs(C1(2) - C2(2)) > 30 Or Abs(C1(3) - C2(3)) > 30) Then t = Not t If t Then Picture1.ForeColor = &H0& Else Picture1.ForeColor = &HFF00& End If Else Picture1.ForeColor = p1(i, j) End If Picture1.PSet (i, j) Next Next End Sub Private Sub Picture1_Click() Me.Visible = False DoEvents GetPoint Me.Visible = True End Sub
希望本文所述对大家的VB程序设计有所帮助。
上一篇:VBS中解决带空格路径的三种方法
栏 目:vb
本文标题:VB实现的《QQ美女找茬游戏》作弊器实例
本文地址:https://www.xiuzhanwang.com/a1/vb/7164.html
您可能感兴趣的文章
- 01-10下载文件到本地运行的vbs
- 01-10什么是一个高效的软件
- 01-10VBS中的正则表达式的用法大全 <font color=red>原创&
- 01-10VBS中SendKeys的基本应用
- 01-10VBS中Select CASE的其它用法
- 01-10VBScript的入门学习资料
- 01-10VBScript教程 第十二课VBScript页面的简单样例
- 01-10VBS教程:正则表达式简介
- 01-10VBS教程:方法-Copy 方法
- 01-10VBS教程:方法-Move 方法
阅读排行
本栏相关
- 01-10下载文件到本地运行的vbs
- 01-10飘叶千夫指源代码,又称qq刷屏器
- 01-10SendKeys参考文档
- 01-10什么是一个高效的软件
- 01-10VBS中的正则表达式的用法大全 &l
- 01-10exe2swf 工具(Adodb.Stream版)
- 01-10VBS中SendKeys的基本应用
- 01-10用VBSCRIPT控制ONSUBMIT事件
- 01-10VBScript教程 第十一课深入VBScript
- 01-10VBScript语法速查及实例说明
随机阅读
- 01-11Mac OSX 打开原生自带读写NTFS功能(图文
- 01-10使用C语言求解扑克牌的顺子及n个骰子
- 08-05织梦dedecms什么时候用栏目交叉功能?
- 01-11ajax实现页面的局部加载
- 08-05DEDE织梦data目录下的sessions文件夹有什
- 01-10delphi制作wav文件的方法
- 01-10C#中split用法实例总结
- 08-05dedecms(织梦)副栏目数量限制代码修改
- 01-10SublimeText编译C开发环境设置
- 04-02jquery与jsp,用jquery