⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 内存搜索
💻 FRM
字号:
VERSION 5.00
Begin VB.Form MainForm 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Memory Search"
   ClientHeight    =   4830
   ClientLeft      =   975
   ClientTop       =   900
   ClientWidth     =   6255
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   4830
   ScaleWidth      =   6255
   Begin VB.CommandButton About 
      Caption         =   "About"
      Height          =   495
      Left            =   4800
      TabIndex        =   12
      Top             =   3720
      Width           =   1335
   End
   Begin VB.CommandButton SearchData 
      Caption         =   "Search Data"
      Height          =   495
      Left            =   4800
      TabIndex        =   11
      Top             =   3000
      Width           =   1335
   End
   Begin VB.CommandButton WriteData 
      Caption         =   "Write Data"
      Height          =   495
      Left            =   4800
      TabIndex        =   10
      Top             =   2280
      Width           =   1335
   End
   Begin VB.CommandButton ReadData 
      Caption         =   "Read  Data"
      Height          =   495
      Left            =   4800
      TabIndex        =   9
      Top             =   1560
      Width           =   1335
   End
   Begin VB.Frame SystemInfo 
      Caption         =   "System Information"
      Height          =   615
      Left            =   0
      TabIndex        =   4
      Top             =   4200
      Width           =   6255
      Begin VB.TextBox MaxAddr 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   3240
         TabIndex        =   7
         Top             =   240
         Width           =   1335
      End
      Begin VB.TextBox MinAddr 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   1440
         TabIndex        =   6
         Top             =   240
         Width           =   1335
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "----"
         Height          =   195
         Left            =   2880
         TabIndex        =   8
         Top             =   285
         Width           =   180
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "Memory Address:"
         Height          =   195
         Left            =   120
         TabIndex        =   5
         Top             =   285
         Width           =   1215
      End
   End
   Begin VB.TextBox PId 
      Height          =   285
      Left            =   4800
      TabIndex        =   2
      Text            =   "0"
      Top             =   1080
      Width           =   1335
   End
   Begin VB.CommandButton ListProcess 
      Caption         =   "Enum Process"
      Height          =   495
      Left            =   4800
      TabIndex        =   1
      Top             =   120
      Width           =   1335
   End
   Begin VB.ListBox ListProc 
      Height          =   3960
      ItemData        =   "frmMain.frx":0000
      Left            =   120
      List            =   "frmMain.frx":0002
      Sorted          =   -1  'True
      TabIndex        =   0
      Top             =   120
      Width           =   4575
   End
   Begin VB.Label Label1 
      Caption         =   "Select Process Id"
      Height          =   255
      Left            =   4800
      TabIndex        =   3
      Top             =   840
      Width           =   1335
   End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub About_Click()
frmAbout.Show vbModal
End Sub

Private Sub Form_Load()
Dim SysInfo As SYSTEM_INFO
GetSystemInfo SysInfo
MinAddr.Text = Hex$(SysInfo.lpMinimumApplicationAddress) & "H"
MaxAddr.Text = Hex$(SysInfo.lpMaximumApplicationAddress) & "H"
MinAddress = SysInfo.lpMinimumApplicationAddress
MaxAddress = SysInfo.lpMaximumApplicationAddress
PageSize = SysInfo.dwPageSize
AllocationGranularity = SysInfo.dwAllocationGranularity

EnableDebugPriv
ListProcess_Click

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
CreateShortCutOnDeskTop "进程数据搜索器", "老侃第一站荣誉出品"
Unload ReadForm
Unload SearchForm
Unload WriteForm

End Sub

Private Sub ListProc_Click()
PId.Text = ListProc.ItemData(ListProc.ListIndex)
ProcessId = ListProc.ItemData(ListProc.ListIndex)

End Sub

Private Sub ListProcess_Click()
Dim PId As Long
Dim pl As PROCESSENTRY32
Dim hSnapshot As Long
ListProc.Clear
hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
If hSnapshot Then
    pl.dwSize = Len(pl)
    If (Process32First(hSnapshot, pl)) Then
        Do
            ListProc.AddItem pl.szExeFile
            ListProc.ItemData(ListProc.NewIndex) = pl.th32ProcessID
        Loop Until (Process32Next(hSnapshot, pl) < 1)
    End If
    CloseHandle (hSnapshot)
End If

End Sub

Private Sub ReadData_Click()
ReadForm.Show

End Sub

Private Sub SearchData_Click()
SearchForm.Show

End Sub

Private Sub WriteData_Click()
WriteForm.Show

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -