📄 form1.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "扫雷外挂"
ClientHeight = 4335
ClientLeft = 45
ClientTop = 435
ClientWidth = 3960
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 4335
ScaleWidth = 3960
StartUpPosition = 3 '窗口缺省
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 9
Top = 3960
Width = 3960
_ExtentX = 6985
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 2
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 6174
MinWidth = 6174
Text = "谨以此程序送给我最爱的人--(☆莲☆)"
TextSave = "谨以此程序送给我最爱的人--(☆莲☆)"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin VB.CommandButton Command2
Caption = " 退出"
Height = 495
Left = 2160
TabIndex = 8
Top = 3360
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "扫描"
Height = 495
Left = 360
TabIndex = 7
Top = 3360
Width = 1215
End
Begin VB.Frame Frame2
Caption = "扫描选项:"
Height = 2175
Left = 120
TabIndex = 3
Top = 1080
Width = 3615
Begin VB.TextBox txtSleep
Alignment = 2 'Center
Height = 270
Left = 1560
TabIndex = 11
Text = "50"
Top = 1440
Width = 615
End
Begin VB.CheckBox chkSleep
Caption = "自动扫雷延时"
Height = 255
Left = 120
TabIndex = 10
Top = 1440
Width = 1455
End
Begin VB.OptionButton OptAuto
Caption = "自动扫雷"
Height = 255
Left = 120
TabIndex = 6
Top = 1080
Width = 1455
End
Begin VB.OptionButton OptMine
Caption = "标记雷区"
Height = 255
Left = 120
TabIndex = 5
Top = 720
Value = -1 'True
Width = 1455
End
Begin VB.OptionButton OptNotMine
Caption = "标记非雷区"
Height = 255
Left = 120
TabIndex = 4
Top = 360
Width = 1455
End
Begin VB.Label lblInfo
Caption = "大概 20 秒可以完成扫雷任务。"
Height = 255
Left = 120
TabIndex = 13
Top = 1800
Width = 3375
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "毫秒"
Height = 180
Left = 2280
TabIndex = 12
Top = 1440
Width = 360
End
End
Begin VB.Frame Frame1
Caption = "扫雷版本:"
Height = 855
Left = 120
TabIndex = 0
Top = 120
Width = 3615
Begin VB.OptionButton OptXP
Caption = "Windows XP"
Height = 255
Left = 1680
TabIndex = 2
Top = 360
Width = 1455
End
Begin VB.OptionButton Opt2000
Caption = "Windows 2000"
Height = 255
Left = 120
TabIndex = 1
Top = 360
Value = -1 'True
Width = 1455
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'★★★★★****************************★★★★★**********************★★★★★
'金诺VB园-收藏整理
'本站是专注于VB和VBNET编程的源码下载站
'发布日期:2008-3-16 14:31:52
'网 站:http://www.vbget.com/ (金诺VB园)
'网 站:http://www.vbget.com/daohan/ (VB编程网址导航)
'E-Mail :vbget@yahoo.cn
'QQ :158676144
'源码作者:如果您有VB商业源码需要获得收益,本站将有VIP收费下载频道可供你发布!
' 您有权定价;改价;删除;及即时查看下载量(即收益),所有收益全部归您!
' 本站将在双方协商的一个金额周期内打款到作者帐户中,您只需负责打款费用!
' 本站只作为一个平台提供最新VB源码咨讯和源码下载!
'本注释由<站长工具之智能注释>软件自动添加!金诺VB园有此软件下载!
'★★★★★****************************★★★★★**********************★★★★★
Option Explicit
Dim mP As POINTAPI '存储鼠标位置
Private Sub Command1_Click()
Dim hMine As Long '扫雷窗体的句柄
Dim pMine As Long '扫雷窗体的进程柄
Dim MineID As Long '扫雷窗体的进程ID
Dim lpBuffer As Byte '用于读取内存中的内容
Dim nSize As Long '读取的大小
Dim lpNumberOfBytesRead As Long '已读取的字节数
Dim S As String
Dim Row, Col As Integer '行数、列数
Dim mWidth, mHeight, mPlayType As Integer '雷的列数、行数、玩的模式
Dim MineNum As Integer, mTime As Long '雷数
'扫雷窗体上第一行第一列相对于这个窗体的偏移量,用于以后的鼠标自动点击
Dim xOffset As Integer, yOffset As Integer
Dim miBegin As Long, miHeight As Long, miWidth As Long, miStart As Long, miPlayType As Long
'&H010052C0 玩的模式
'&H010052C4 2K下是雷数起始地址
'&H010052C8 2K下是雷区高度起始地址
'&H010052CC 2K下是雷区宽度起始地址
'&H01005721 2K下是雷区内容起始地址,依次是&H01005721+高*32+宽
'&H01005A60 2K下是雷剩余个数
'&H010056A0 玩的模式
'&H01005330/56A4 XP下是雷数起始地址
'&H01005338/56A8 XP下是雷区高度起始地址
'&H01005334/56AC XP下是雷区宽度起始地址
'&H01005361 XP下是雷区内容起始地址,依次是&H01005361+高*32+宽
'&H01005194 XP下是雷剩余个数
StatusBar1.Panels(1).Width = 2500
StatusBar1.Panels(2).Width = 1300
If Opt2000.Value Then
miBegin = &H10052C4
miHeight = &H10052C8
miWidth = &H10052CC
miStart = &H1005721
miPlayType = &H10052C0
Else
miBegin = &H1005330
miHeight = &H1005338
miWidth = &H1005334
miStart = &H1005361
miPlayType = &H10056A0
End If
hMine = FindWindow(vbNullString, "扫雷") '找 扫雷 窗口
Call GetWindowThreadProcessId(hMine, MineID) '返回 扫雷 进程的ID,为mineId
yOffset = 60
xOffset = 20
pMine = OpenProcess(PROCESS_VM_READ, True, MineID) '打开 扫雷 进程
If pMine = 0 Then
Call MsgBox("你还没有打开扫雷吧:)", vbInformation, "找不到哦")
RunMine
Exit Sub
End If
nSize = 1
'ReDim lpBuffer(nSize - 1)
If ReadProcessMemory(pMine, miBegin, lpBuffer, nSize, lpNumberOfBytesRead) Then '进程句柄,内存区基址,数据缓冲区,要读的字节数,已读字节数
Me.Caption = "共有雷数 " + CStr(lpBuffer) + " 个"
MineNum = lpBuffer
End If
If ReadProcessMemory(pMine, miWidth, lpBuffer, nSize, lpNumberOfBytesRead) Then
mWidth = lpBuffer '雷区宽度,即 扫雷 的列数
End If
If ReadProcessMemory(pMine, miHeight, lpBuffer, nSize, lpNumberOfBytesRead) Then
mHeight = lpBuffer '雷区高度,即 扫雷 的行数
End If
StatusBar1.Panels(1).Text = "雷区宽度 " + CStr(mWidth) + " 雷区高度 " + CStr(mHeight)
If ReadProcessMemory(pMine, miPlayType, lpBuffer, nSize, lpNumberOfBytesRead) Then
mPlayType = lpBuffer '扫雷模式
End If
Select Case mPlayType
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -