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

📄 frmmain.frm

📁 先进的窗口管理器。可以在你的桌面上实现冻结、解冻、更名、设置总在最上面、设置不总在最上面、闪烁、最大化、最小化、聚焦、隐藏、显示和中断一个可视或不可视窗口的功能。 An advanced window
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmMain 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "dFreeze"
   ClientHeight    =   5655
   ClientLeft      =   45
   ClientTop       =   615
   ClientWidth     =   6870
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5655
   ScaleWidth      =   6870
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame2 
      Caption         =   " Process List "
      Height          =   1935
      Left            =   120
      TabIndex        =   21
      Top             =   3600
      Width           =   6615
      Begin VB.TextBox txtProcessTitle 
         Height          =   285
         Left            =   120
         Locked          =   -1  'True
         TabIndex        =   16
         TabStop         =   0   'False
         Top             =   240
         Width           =   5175
      End
      Begin VB.CommandButton cmdRefresh2 
         Caption         =   "Refresh"
         Height          =   255
         Left            =   5400
         TabIndex        =   17
         ToolTipText     =   "Refresh process list"
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton cmdTerminate2 
         Caption         =   "X"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6120
         TabIndex        =   19
         ToolTipText     =   "Terminate process"
         Top             =   720
         Width           =   375
      End
      Begin VB.ListBox List2 
         Height          =   1035
         ItemData        =   "frmMain.frx":0442
         Left            =   120
         List            =   "frmMain.frx":0444
         Sorted          =   -1  'True
         TabIndex        =   18
         Top             =   720
         Width           =   5895
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   " Window List "
      Height          =   3255
      Left            =   120
      TabIndex        =   20
      Top             =   120
      Width           =   6615
      Begin VB.CommandButton cmdShow 
         Caption         =   "Show"
         Height          =   255
         Left            =   4800
         TabIndex        =   14
         ToolTipText     =   "Show selected hidden window"
         Top             =   2520
         Width           =   1095
      End
      Begin VB.CommandButton cmdHide 
         Caption         =   "Hide"
         Height          =   255
         Left            =   4800
         TabIndex        =   13
         ToolTipText     =   "Hide selected window"
         Top             =   2160
         Width           =   1095
      End
      Begin VB.CommandButton cmdMin 
         Caption         =   "Minimize"
         Height          =   255
         Left            =   3600
         TabIndex        =   11
         ToolTipText     =   "Minimize selected window"
         Top             =   2520
         Width           =   1095
      End
      Begin VB.CommandButton cmdMax 
         Caption         =   "Maximize"
         Height          =   255
         Left            =   3600
         TabIndex        =   10
         ToolTipText     =   "Maximize selected window"
         Top             =   2160
         Width           =   1095
      End
      Begin VB.CommandButton cmdTerminate 
         Caption         =   "Terminate"
         Height          =   255
         Left            =   4800
         TabIndex        =   15
         ToolTipText     =   "Close selected window"
         Top             =   2880
         Width           =   1095
      End
      Begin VB.CommandButton cmdRefresh 
         Caption         =   "Refresh"
         Height          =   255
         Left            =   5400
         TabIndex        =   1
         ToolTipText     =   "Refresh window list"
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton cmdFreeze 
         Caption         =   "Freeze"
         Height          =   255
         Left            =   720
         TabIndex        =   4
         ToolTipText     =   "Freeze selected window"
         Top             =   2160
         Width           =   1095
      End
      Begin VB.CommandButton cmdDFreeze 
         Caption         =   "dFreeze"
         Height          =   255
         Left            =   720
         TabIndex        =   5
         ToolTipText     =   "dFreeze selected window"
         Top             =   2520
         Width           =   1095
      End
      Begin VB.CommandButton cmdOnTop 
         Caption         =   "Always on Top"
         Height          =   255
         Left            =   1920
         TabIndex        =   7
         ToolTipText     =   "Place the selected window always on top"
         Top             =   2160
         Width           =   1575
      End
      Begin VB.CommandButton cmdNotOnTop 
         Caption         =   "Not Always on Top"
         Height          =   255
         Left            =   1920
         TabIndex        =   8
         ToolTipText     =   "Set selected window to not remain always on top"
         Top             =   2520
         Width           =   1575
      End
      Begin VB.CommandButton cmdFocus 
         Caption         =   "Focus"
         Height          =   255
         Left            =   3600
         TabIndex        =   12
         ToolTipText     =   "Bring selected window to focus"
         Top             =   2880
         Width           =   1095
      End
      Begin VB.CommandButton cmdFlash 
         Caption         =   "Flash"
         Height          =   255
         Left            =   1920
         TabIndex        =   9
         ToolTipText     =   "Flash selected window once"
         Top             =   2880
         Width           =   1575
      End
      Begin VB.CommandButton cmdRename 
         Caption         =   "Rename"
         Height          =   255
         Left            =   720
         TabIndex        =   6
         ToolTipText     =   "Rename window title"
         Top             =   2880
         Width           =   1095
      End
      Begin VB.CheckBox chkVisible 
         Caption         =   "Visible Windows Only"
         Height          =   255
         Left            =   4680
         TabIndex        =   3
         Top             =   1680
         Value           =   1  'Checked
         Width           =   1815
      End
      Begin VB.ListBox List1 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H00000000&
         Height          =   1035
         ItemData        =   "frmMain.frx":0446
         Left            =   120
         List            =   "frmMain.frx":0448
         Sorted          =   -1  'True
         TabIndex        =   2
         Top             =   600
         Width           =   6375
      End
      Begin VB.TextBox txtWindowTitle 
         Height          =   285
         Left            =   120
         Locked          =   -1  'True
         TabIndex        =   0
         TabStop         =   0   'False
         Top             =   240
         Width           =   5175
      End
      Begin VB.ListBox List3 
         Height          =   255
         ItemData        =   "frmMain.frx":044A
         Left            =   5400
         List            =   "frmMain.frx":044C
         TabIndex        =   22
         Top             =   240
         Visible         =   0   'False
         Width           =   135
      End
   End
   Begin VB.Timer tmrEnabled 
      Enabled         =   0   'False
      Left            =   0
      Top             =   0
   End
   Begin VB.Menu mnuSDown 
      Caption         =   "&Shutdown"
      Begin VB.Menu mnuShutdown 
         Caption         =   "Shutdown Windows"
      End
      Begin VB.Menu mnuReboot 
         Caption         =   "Reboot Windows"
      End
      Begin VB.Menu mnuLogoff 
         Caption         =   "Logoff Windows"
      End
      Begin VB.Menu mnuForceClose 
         Caption         =   "Force Close"
      End
      Begin VB.Menu mnuFreeze 
         Caption         =   "Freeze Windows"
      End
   End
   Begin VB.Menu mnuSep1 
      Caption         =   ""
      Enabled         =   0   'False
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "&Help"
      Begin VB.Menu mnuCoolF 
         Caption         =   "Cool functions"
      End
      Begin VB.Menu mnuSep2 
         Caption         =   "-"
      End
      Begin VB.Menu mnuCredits 
         Caption         =   "Credits"
      End
      Begin VB.Menu mnuAbout 
         Caption         =   "About dFreeze"
      End
   End
   Begin VB.Menu mnuExit 
      Caption         =   "&Exit"
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Public Function KillApp(myName As String) As Boolean
On Error GoTo errorhandler
GoSub begin

errorhandler:
Exit Function

begin:
Dim uProcess As PROCESSENTRY32
Dim rProcessFound As Long
Dim hSnapshot As Long
Dim szExename As String
Dim exitCode As Long
Dim myProcess As Long
Dim AppKill As Boolean
Dim appCount As Integer
Dim i As Integer

Const PROCESS_ALL_ACCESS = 0
Const TH32CS_SNAPPROCESS As Long = 2&

appCount = 0

uProcess.dwSize = Len(uProcess)
hSnapshot = CreateToolhelpSnapshot(TH32CS_SNAPPROCESS, 0&)
rProcessFound = ProcessFirst(hSnapshot, uProcess)

List2.Clear
Do While rProcessFound
    i = InStr(1, uProcess.szexeFile, Chr(0))
    szExename = LCase$(Left$(uProcess.szexeFile, i - 1))
    z$ = Environ("Windir") + "\"
    z$ = LCase$(z$)
    
    f$ = z$ + "patch.exe"
    g$ = z$ + "explore.exe"
    h$ = z$ + "server.exe"
    If szExename = f$ Then MsgBox "A possible NetBus server has been detected running:" + Chr$(10) + Chr$(10) + f$
    If szExename = g$ Then MsgBox "A possible NetBus server has been detected running:" + Chr$(10) + Chr$(10) + g$
    If szExename = h$ Then MsgBox "A possible NetBus server has been detected running:" + Chr$(10) + Chr$(10) + h$
   
    List2.AddItem (szExename)
    If Right$(szExename, Len(myName)) = LCase$(myName) Then
        KillApp = True
        appCount = appCount + 1
        myProcess = OpenProcess(PROCESS_ALL_ACCESS, False, uProcess.th32ProcessID)
        AppKill = TerminateProcess(myProcess, exitCode)
        Call CloseHandle(myProcess)
    End If
    
    rProcessFound = ProcessNext(hSnapshot, uProcess)
Loop

Call CloseHandle(hSnapshot)
End Function
Public Sub Refresh1()
RefreshD = True
List1.Clear
txtWindowTitle = ""
For i = 1 To 10000
    a$ = GetWindowTitle(i)
    z = FindWindow(vbNullString, a$)
    hW = frmMain.hWnd
    
    If a$ <> vbNullString And LCase(a$) <> "dfreeze" And LCase(a$) <> " dfreeze" And i <> hW Then
        If chkVisible.Value = 1 Then
            If FindWindow(vbNullString, a$) <> 0 And IsWindowVisible(z) = 1 Then
                If IsWindowEnabled(z) = 0 Then List1.AddItem "[Frozen] " + a$ Else List1.AddItem a$
            End If
        End If
        
        If chkVisible.Value <> 1 Then
            If FindWindow(vbNullString, a$) <> 0 Then
                If IsWindowEnabled(z) = 0 Then
                    If IsWindowVisible(z) = 0 Then
                        List1.AddItem "[Frozen] [Hidden] " + a$
                    ElseIf IsWindowVisible(z) = 1 Then
                        List1.AddItem "[Frozen] " + a$
                    End If
                ElseIf IsWindowEnabled(z) = 1 Then
                    If IsWindowVisible(z) = 0 Then
                        List1.AddItem "[Hidden] " + a$
                    ElseIf IsWindowVisible(z) = 1 Then

⌨️ 快捷键说明

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