www.pudn.com > jybdcx.rar > frmInfo.frm
VERSION 5.00
Begin VB.Form frmInfo
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Caption = "通知"
ClientHeight = 900
ClientLeft = 150
ClientTop = 240
ClientWidth = 3960
ControlBox = 0 'False
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 900
ScaleWidth = 3960
StartUpPosition = 2 '屏幕中心
Begin SimpleMachineProtect.XP_ProgressBar prgInfo
Height = 375
Left = 120
TabIndex = 0
Top = 240
Width = 3735
_ExtentX = 6588
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BrushStyle = 0
Color = 32896
Scrolling = 1
End
Begin VB.Label lblInfo
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请稍后..."
ForeColor = &H00000040&
Height = 195
Left = 1620
TabIndex = 1
Top = 645
Width = 735
End
Begin VB.Menu mnuProcess
Caption = "Process List"
Visible = 0 'False
Begin VB.Menu popProcess
Caption = "进程信息"
Index = 0
End
Begin VB.Menu popProcess
Caption = "-"
Index = 1
End
Begin VB.Menu popProcess
Caption = "刷新进程列表"
Index = 2
End
Begin VB.Menu popProcess
Caption = "-"
Index = 3
End
Begin VB.Menu popProcess
Caption = "打开包含文件夹"
Index = 4
End
Begin VB.Menu popProcess
Caption = "Dos 立即窗口"
Index = 5
End
Begin VB.Menu popProcess
Caption = "显示文件属性"
Index = 6
End
Begin VB.Menu popProcess
Caption = "-"
Index = 7
End
Begin VB.Menu popProcess
Caption = "线程"
Index = 8
Begin VB.Menu popThreads
Caption = "继续"
Index = 0
End
Begin VB.Menu popThreads
Caption = "挂起"
Index = 1
End
End
Begin VB.Menu popProcess
Caption = "优先级"
Index = 9
Begin VB.Menu popBase
Caption = "实时"
Index = 0
End
Begin VB.Menu popBase
Caption = "高级"
Index = 1
End
Begin VB.Menu popBase
Caption = "正常"
Index = 2
End
Begin VB.Menu popBase
Caption = "空闲"
Index = 3
End
End
Begin VB.Menu popProcess
Caption = "-"
Index = 10
End
Begin VB.Menu popProcess
Caption = "终止"
Index = 11
End
End
Begin VB.Menu mnuHelp
Caption = "在线帮助"
Visible = 0 'False
Begin VB.Menu popHelp
Caption = "作者主页"
Index = 0
End
Begin VB.Menu popHelp
Caption = "项目主页"
Index = 1
End
Begin VB.Menu popHelp
Caption = "-"
Index = 2
End
Begin VB.Menu popHelp
Caption = "产品新闻"
Index = 3
End
Begin VB.Menu popHelp
Caption = "常见问题及支持"
Index = 4
End
Begin VB.Menu popHelp
Caption = "信息反馈 (错误, 建议)..."
Index = 5
End
Begin VB.Menu popHelp
Caption = "检查更新..."
Index = 6
End
Begin VB.Menu popHelp
Caption = "提交病毒代码"
Index = 7
End
End
Begin VB.Menu mnuSystray
Caption = ""
Visible = 0 'False
Begin VB.Menu popSystray
Caption = "恢复视窗"
Index = 0
End
Begin VB.Menu popSystray
Caption = "-"
Index = 1
End
Begin VB.Menu popSystray
Caption = "检查更新"
Index = 2
End
Begin VB.Menu popSystray
Caption = "联机帮助"
Index = 3
End
Begin VB.Menu popSystray
Caption = "提交病毒代码"
Index = 4
End
Begin VB.Menu popSystray
Caption = "-"
Index = 5
End
Begin VB.Menu popSystray
Caption = "退出操作系统"
Index = 6
Begin VB.Menu popExit
Caption = "注销"
Index = 0
End
Begin VB.Menu popExit
Caption = "重启"
Index = 1
End
Begin VB.Menu popExit
Caption = "关机"
Index = 2
End
End
Begin VB.Menu popSystray
Caption = "-"
Index = 7
End
Begin VB.Menu popSystray
Caption = "退出程序"
Index = 8
End
End
End
Attribute VB_Name = "frmInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'---------------------------------------------------------------------------------------'
' '
' SIMPLE MACHINE PROTECT '
' Copyright (C) 2008 Bagus Judistirah '
' '
' This program is free software; you can redistribute it and/or modify '
' it under the terms of the GNU General Public License as published by '
' the Free Software Foundation; either version 2 of the License, or '
' (at your option) any later version. '
' '
' This program is distributed in the hope that it will be useful, '
' but WITHOUT ANY WARRANTY; without even the implied warranty of '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '
' GNU General Public License for more details. '
' '
' You should have received a copy of the GNU General Public License along '
' with this program; if not, write to the Free Software Foundation, Inc., '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. '
' '
'---------------------------------------------------------------------------------------'
' '
' Module : Simple Machine Protect - Portable Edition '
' Author : Bagus Judistirah (bagus_badboy) '
' E-mail : bagus.judistirah@hotmail.com or bagus_badboy@users.sourceforge.net '
' Homepage : http://wwww.e-freshware.com '
' : http://smp.e-freshware.com '
' Project : http://sourceforge.net/projects/smpav/ '
' License : GNU General Public License '
' History : Minor bugs fixed. '
' '
'---------------------------------------------------------------------------------------'
' '
' Note : I try to keep my software as bug-free as possible. '
' But it's a general rule that no software ever is error free, '
' and the number of errors increases with the complexity of the program. '
' '
'---------------------------------------------------------------------------------------'
' '
' Control : Simple Machine Protect has been written and developed using Microsoft '
' Visual Basic 6. Portions of the source code of this program have been '
' taken from or inspired by the source of the following products. Please '
' do not remove these copyright notices. The following code & control was '
' used during the development of Simple Machine Protect. '
' * Calculate CRC32 Checksum Precompiled Assembler Code, Get Icon '
' Coded by: Noel A Dacara '
' Downloaded from: http://www.planetsourcecode.com '
' * XP Theme '
' Coded by: Steve McMahon '
' Downloaded from: http://www.vbaccelerator.com '
' * Chameleon Button '
' Coded by: Gonchuki '
' Downloaded from: http://www.planetsourcecode.com '
' * Cool XP ProgressBar '
' Coded by: Mario Flores '
' Downloaded from: http://www.planetsourcecode.com '
' * OnSystray '
' Coded by: Bagus Judistirah '
' '
'---------------------------------------------------------------------------------------'
' '
' Disclaimer : Modifying the registry can cause serious problems that may require you '
' to reinstall your operating system. I cannot guarantee that problems '
' resulting from modifications to the registry can be solved. '
' Use the information provided at your own risk. '
' '
'---------------------------------------------------------------------------------------'
' Thanks : * SOURCEFORGE.NET [http://www.sourceforge.net] '
' * OGNIZER [http://www.ognizer.net or http://virus.ognizer.net] '
' * VIROLOGI [http://www.virologi.info] '
' * ANSAV [http://www.ansav.com] '
' * VBACCELERATOR [http://www.vbaccelerator.com] '
' * VBBEGO [http://www.vb-bego.com] '
' * MIGHTHOST [http://www.mighthost.com] '
' * UDARAMAYA [http://www.udaramaya.com] '
' * PSC - The home millions of lines of source code. '
' [http://www.planetsourcecode.com] '
' * DONIXSOFTWARE - Dony Wahyu Isp [http://donixsoftware.web.id] '
' * Aat Shadewa, Jan Kristanto, Boby Ertanto, Irwan Halim, Dony Wahyu Isp, '
' Yusuf Teretsa Patiku, Erwin, MI People, Nita, Husni, I Gede, Fadil, '
' Harry, Jimmy Wijaya, Sumanto Adi, Gafur, Selwin, Deny Kurniawan, '
' Paul, Marx, Gonchuki, Noel A Dacara, Steve McMahon, Mario Flores, '
' VM, Wardana, Achmad Darmal, Andi, Septian, all my friends, '
' Dream Theater, Evanescence, & Umild. '
' * Free software developer around the world. '
' * Thanks to all for the suggestions and comments. '
' '
'---------------------------------------------------------------------------------------'
' '
' Contact : If you have any questions, suggestions, bug reports or anything else, '
' feel free to contact me at bagus.judistirah@hotmail.com or '
' bagus_badboy@users.sourceforge.net. '
' '
'---------------------------------------------------------------------------------------'
Private Sub Form_Activate()
lblInfo.ForeColor = prgInfo.Color
AlwaysOnTop Me.hwnd, True
Screen.MousePointer = vbHourglass
Dim i As Long
i = 0
Do
DoEvents
i = i + 2
prgInfo.Value = i
Sleep 1
Loop Until i = 100
Sleep 100
Screen.MousePointer = vbDefault
Unload Me
End Sub
Private Sub mnuProcess_Click()
Dim i As Integer
Dim lPID As Long
Dim sBase As String
With frmMain
sBase = LCase(.lvwProcessExplorer.SelectedItem.SubItems(8))
lPID = .lvwProcessExplorer.SelectedItem.SubItems(5)
End With
If GetAppID = lPID Then
popProcess(8).Enabled = False
popProcess(11).Enabled = False
Else
popProcess(8).Enabled = True
popProcess(11).Enabled = True
End If
With popBase
For i = .LBound To .UBound
.Item(i).Checked = False
Select Case sBase
Case Is = "realtime"
.Item(0).Checked = True
Case Is = "high"
.Item(1).Checked = True
Case Is = "normal"
.Item(2).Checked = True
Case Is = "idle"
.Item(3).Checked = True
Case Else
.Item(i).Checked = False
End Select
Next i
End With
End Sub
Private Sub popBase_Click(Index As Integer)
Dim lBase As Long
With frmMain
Select Case Index
Case 0
lBase = SetBasePriority(.lvwProcessExplorer, _
5, REALTIME_PRIORITY_CLASS)
Case 1
lBase = SetBasePriority(.lvwProcessExplorer, _
5, HIGH_PRIORITY_CLASS)
Case 2
lBase = SetBasePriority(.lvwProcessExplorer, _
5, NORMAL_PRIORITY_CLASS)
Case 3
lBase = SetBasePriority(.lvwProcessExplorer, _
5, IDLE_PRIORITY_CLASS)
End Select
popProcess_Click 2
End With
End Sub
Private Sub popExit_Click(Index As Integer)
Select Case Index
Case 0
ExitWindowsNow "logoff"
Case 1
ExitWindowsNow "reboot"
Case 2
ExitWindowsNow "shutdown"
End Select
End Sub
Private Sub popHelp_Click(Index As Integer)
With Me
Select Case Index
Case 0
OnlineHelp .hwnd, "www.e-freshware.com"
Case 1
OnlineHelp .hwnd, "sourceforge.net/projects/smpav"
Case 3
OnlineHelp .hwnd, SMP_SITE
Case 4
OnlineHelp .hwnd, SMP_SITE & "/index.php?page=faq"
Case 5
OnlineHelp .hwnd, SMP_SITE & "/index.php?page=contact"
Case 6
OnlineHelp .hwnd, SMP_SITE & "/index.php?page=donate"
Case 7
OnlineHelp .hwnd, SMP_SITE & "/index.php?page=download"
Case 8
OnlineHelp .hwnd, SMP_SITE & "/index.php?page=upload"
End Select
End With
End Sub
Private Sub popProcess_Click(Index As Integer)
Dim lPID As Long
Dim sProc As String
With frmMain
With .lvwProcessExplorer
lPID = .SelectedItem.SubItems(5)
sProc = .SelectedItem.SubItems(1)
End With
Select Case Index
Case 0
frmProcInfo.Show vbModal
Case 2
Screen.MousePointer = vbHourglass
NTProcessList .lvwProcessExplorer, .ilsProcessExplorer
.lvwProcessExplorer.SetFocus
Screen.MousePointer = vbDefault
Case 4
OpenInFolder .lvwProcessExplorer, 1
popProcess_Click 2
Case 5
OpenDosPrompt .lvwProcessExplorer, 1
popProcess_Click 2
Case 6
ShowFileProperties .hwnd, .lvwProcessExplorer, 1
popProcess_Click 2
Case 11
TerminateProcessID .lvwProcessExplorer, 5
popProcess_Click 2
End Select
End With
End Sub
Private Sub popSystray_Click(Index As Integer)
On Error Resume Next
Select Case Index
Case 0
With frmMain
.Show
.OnSystray.Visible = False
End With
Unload frmFinish
Case 2
popHelp_Click 7
Case 3
popHelp_Click 3
Case 4
popHelp_Click 8
Case 8
If MsgBox("你确定要退出吗?", _
vbQuestion + vbYesNo + vbDefaultButton2, "提示") = vbYes Then
ExitNow
End If
End Select
End Sub
Private Sub popThreads_Click(Index As Integer)
With frmMain
Select Case Index
Case 0
SetSuspendResumeThread .lvwProcessExplorer, 5, False
Case 1
SetSuspendResumeThread .lvwProcessExplorer, 5, True
End Select
popProcess_Click 2
End With
End Sub