home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD90538172000.psc / Process.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1999-09-15  |  19.9 KB  |  609 lines

  1. VERSION 5.00
  2. Begin VB.Form lstProcess 
  3.    Caption         =   "Terminator"
  4.    ClientHeight    =   2952
  5.    ClientLeft      =   60
  6.    ClientTop       =   636
  7.    ClientWidth     =   8496
  8.    BeginProperty Font 
  9.       Name            =   "Comic Sans MS"
  10.       Size            =   8.4
  11.       Charset         =   204
  12.       Weight          =   400
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    Icon            =   "Process.frx":0000
  18.    KeyPreview      =   -1  'True
  19.    LinkTopic       =   "Form1"
  20.    MaxButton       =   0   'False
  21.    ScaleHeight     =   246
  22.    ScaleMode       =   3  'Pixel
  23.    ScaleWidth      =   708
  24.    StartUpPosition =   2  'CenterScreen
  25.    Begin VB.Timer Timer2 
  26.       Interval        =   200
  27.       Left            =   8160
  28.       Top             =   2760
  29.    End
  30.    Begin VB.ListBox lstProcess 
  31.       Height          =   2784
  32.       Left            =   120
  33.       TabIndex        =   5
  34.       Top             =   2880
  35.       Width           =   6852
  36.    End
  37.    Begin VB.Frame Frame1 
  38.       Caption         =   "Terminate"
  39.       Height          =   2655
  40.       Left            =   120
  41.       TabIndex        =   2
  42.       Top             =   0
  43.       Width           =   6855
  44.       Begin VB.PictureBox Picture1 
  45.          Appearance      =   0  'Flat
  46.          AutoRedraw      =   -1  'True
  47.          BackColor       =   &H80000000&
  48.          BorderStyle     =   0  'None
  49.          ForeColor       =   &H80000008&
  50.          Height          =   240
  51.          Index           =   5
  52.          Left            =   120
  53.          ScaleHeight     =   240
  54.          ScaleWidth      =   240
  55.          TabIndex        =   39
  56.          Top             =   1320
  57.          Width           =   240
  58.       End
  59.       Begin VB.PictureBox Picture1 
  60.          Appearance      =   0  'Flat
  61.          AutoRedraw      =   -1  'True
  62.          BackColor       =   &H80000000&
  63.          BorderStyle     =   0  'None
  64.          ForeColor       =   &H80000008&
  65.          Height          =   240
  66.          Index           =   16
  67.          Left            =   4800
  68.          ScaleHeight     =   240
  69.          ScaleWidth      =   240
  70.          TabIndex        =   38
  71.          Top             =   2280
  72.          Width           =   240
  73.       End
  74.       Begin VB.PictureBox Picture1 
  75.          Appearance      =   0  'Flat
  76.          AutoRedraw      =   -1  'True
  77.          BackColor       =   &H80000000&
  78.          BorderStyle     =   0  'None
  79.          ForeColor       =   &H80000008&
  80.          Height          =   240
  81.          Index           =   15
  82.          Left            =   3240
  83.          ScaleHeight     =   240
  84.          ScaleWidth      =   240
  85.          TabIndex        =   37
  86.          Top             =   2280
  87.          Width           =   240
  88.       End
  89.       Begin VB.PictureBox Picture1 
  90.          Appearance      =   0  'Flat
  91.          AutoRedraw      =   -1  'True
  92.          BackColor       =   &H80000005&
  93.          BorderStyle     =   0  'None
  94.          ForeColor       =   &H80000008&
  95.          Height          =   240
  96.          Index           =   0
  97.          Left            =   1680
  98.          ScaleHeight     =   240
  99.          ScaleWidth      =   240
  100.          TabIndex        =   34
  101.          Top             =   240
  102.          Width           =   240
  103.          Visible         =   0   'False
  104.       End
  105.       Begin VB.PictureBox Picture1 
  106.          Appearance      =   0  'Flat
  107.          AutoRedraw      =   -1  'True
  108.          BackColor       =   &H80000000&
  109.          BorderStyle     =   0  'None
  110.          ForeColor       =   &H80000008&
  111.          Height          =   240
  112.          Index           =   14
  113.          Left            =   1680
  114.          ScaleHeight     =   240
  115.          ScaleWidth      =   240
  116.          TabIndex        =   33
  117.          Top             =   2280
  118.          Width           =   240
  119.       End
  120.       Begin VB.PictureBox Picture1 
  121.          Appearance      =   0  'Flat
  122.          AutoRedraw      =   -1  'True
  123.          BackColor       =   &H80000000&
  124.          BorderStyle     =   0  'None
  125.          ForeColor       =   &H80000008&
  126.          Height          =   240
  127.          Index           =   13
  128.          Left            =   120
  129.          ScaleHeight     =   240
  130.          ScaleWidth      =   240
  131.          TabIndex        =   32
  132.          Top             =   2280
  133.          Width           =   240
  134.       End
  135.       Begin VB.PictureBox Picture1 
  136.          Appearance      =   0  'Flat
  137.          AutoRedraw      =   -1  'True
  138.          BackColor       =   &H80000000&
  139.          BorderStyle     =   0  'None
  140.          ForeColor       =   &H80000008&
  141.          Height          =   240
  142.          Index           =   12
  143.          Left            =   4800
  144.          ScaleHeight     =   240
  145.          ScaleWidth      =   240
  146.          TabIndex        =   31
  147.          Top             =   1800
  148.          Width           =   240
  149.       End
  150.       Begin VB.PictureBox Picture1 
  151.          Appearance      =   0  'Flat
  152.          AutoRedraw      =   -1  'True
  153.          BackColor       =   &H80000000&
  154.          BorderStyle     =   0  'None
  155.          ForeColor       =   &H80000008&
  156.          Height          =   240
  157.          Index           =   11
  158.          Left            =   3240
  159.          ScaleHeight     =   240
  160.          ScaleWidth      =   240
  161.          TabIndex        =   30
  162.          Top             =   1800
  163.          Width           =   240
  164.       End
  165.       Begin VB.PictureBox Picture1 
  166.          Appearance      =   0  'Flat
  167.          AutoRedraw      =   -1  'True
  168.          BackColor       =   &H80000000&
  169.          BorderStyle     =   0  'None
  170.          ForeColor       =   &H80000008&
  171.          Height          =   240
  172.          Index           =   10
  173.          Left            =   1680
  174.          ScaleHeight     =   240
  175.          ScaleWidth      =   240
  176.          TabIndex        =   29
  177.          Top             =   1800
  178.          Width           =   240
  179.       End
  180.       Begin VB.PictureBox Picture1 
  181.          Appearance      =   0  'Flat
  182.          AutoRedraw      =   -1  'True
  183.          BackColor       =   &H80000000&
  184.          BorderStyle     =   0  'None
  185.          ForeColor       =   &H80000008&
  186.          Height          =   240
  187.          Index           =   9
  188.          Left            =   120
  189.          ScaleHeight     =   240
  190.          ScaleWidth      =   240
  191.          TabIndex        =   28
  192.          Top             =   1800
  193.          Width           =   240
  194.       End
  195.       Begin VB.PictureBox Picture1 
  196.          Appearance      =   0  'Flat
  197.          AutoRedraw      =   -1  'True
  198.          BackColor       =   &H80000000&
  199.          BorderStyle     =   0  'None
  200.          ForeColor       =   &H80000008&
  201.          Height          =   240
  202.          Index           =   8
  203.          Left            =   4800
  204.          ScaleHeight     =   240
  205.          ScaleWidth      =   240
  206.          TabIndex        =   27
  207.          Top             =   1320
  208.          Width           =   240
  209.       End
  210.       Begin VB.PictureBox Picture1 
  211.          Appearance      =   0  'Flat
  212.          AutoRedraw      =   -1  'True
  213.          BackColor       =   &H80000000&
  214.          BorderStyle     =   0  'None
  215.          ForeColor       =   &H80000008&
  216.          Height          =   240
  217.          Index           =   7
  218.          Left            =   3240
  219.          ScaleHeight     =   240
  220.          ScaleWidth      =   240
  221.          TabIndex        =   26
  222.          Top             =   1320
  223.          Width           =   240
  224.       End
  225.       Begin VB.PictureBox Picture1 
  226.          Appearance      =   0  'Flat
  227.          AutoRedraw      =   -1  'True
  228.          BackColor       =   &H80000000&
  229.          BorderStyle     =   0  'None
  230.          ForeColor       =   &H80000008&
  231.          Height          =   240
  232.          Index           =   6
  233.          Left            =   1680
  234.          ScaleHeight     =   240
  235.          ScaleWidth      =   240
  236.          TabIndex        =   25
  237.          Top             =   1320
  238.          Width           =   240
  239.       End
  240.       Begin VB.PictureBox Picture1 
  241.          Appearance      =   0  'Flat
  242.          AutoRedraw      =   -1  'True
  243.          BackColor       =   &H80000000&
  244.          BorderStyle     =   0  'None
  245.          ForeColor       =   &H80000008&
  246.          Height          =   240
  247.          Index           =   4
  248.          Left            =   4800
  249.          ScaleHeight     =   240
  250.          ScaleWidth      =   240
  251.          TabIndex        =   24
  252.          Top             =   840
  253.          Width           =   240
  254.       End
  255.       Begin VB.PictureBox Picture1 
  256.          Appearance      =   0  'Flat
  257.          AutoRedraw      =   -1  'True
  258.          BackColor       =   &H80000000&
  259.          BorderStyle     =   0  'None
  260.          ForeColor       =   &H80000008&
  261.          Height          =   240
  262.          Index           =   3
  263.          Left            =   3240
  264.          ScaleHeight     =   240
  265.          ScaleWidth      =   240
  266.          TabIndex        =   23
  267.          Top             =   840
  268.          Width           =   240
  269.       End
  270.       Begin VB.PictureBox Picture1 
  271.          Appearance      =   0  'Flat
  272.          AutoRedraw      =   -1  'True
  273.          BackColor       =   &H80000000&
  274.          BorderStyle     =   0  'None
  275.          ForeColor       =   &H80000008&
  276.          Height          =   240
  277.          Index           =   2
  278.          Left            =   1680
  279.          ScaleHeight     =   240
  280.          ScaleWidth      =   240
  281.          TabIndex        =   22
  282.          Top             =   840
  283.          Width           =   240
  284.       End
  285.       Begin VB.PictureBox Picture1 
  286.          Appearance      =   0  'Flat
  287.          AutoRedraw      =   -1  'True
  288.          BackColor       =   &H80000000&
  289.          BorderStyle     =   0  'None
  290.          ForeColor       =   &H80000008&
  291.          Height          =   240
  292.          Index           =   1
  293.          Left            =   120
  294.          ScaleHeight     =   240
  295.          ScaleWidth      =   240
  296.          TabIndex        =   21
  297.          Top             =   840
  298.          Width           =   240
  299.       End
  300.       Begin VB.Label Label2 
  301.          Caption         =   "Label2"
  302.          Height          =   255
  303.          Index           =   16
  304.          Left            =   5160
  305.          TabIndex        =   36
  306.          Top             =   2280
  307.          Width           =   1335
  308.       End
  309.       Begin VB.Label Label2 
  310.          Caption         =   "Label2"
  311.          Height          =   255
  312.          Index           =   15
  313.          Left            =   3600
  314.          TabIndex        =   35
  315.          Top             =   2280
  316.          Width           =   1335
  317.       End
  318.       Begin VB.Label Label2 
  319.          Caption         =   "Label2"
  320.          Height          =   255
  321.          Index           =   14
  322.          Left            =   2040
  323.          TabIndex        =   20
  324.          Top             =   2280
  325.          Width           =   1335
  326.       End
  327.       Begin VB.Label Label2 
  328.          Caption         =   "Label2"
  329.          Height          =   255
  330.          Index           =   13
  331.          Left            =   480
  332.          TabIndex        =   19
  333.          Top             =   2280
  334.          Width           =   1335
  335.       End
  336.       Begin VB.Label Label2 
  337.          Caption         =   "Label2"
  338.          Height          =   255
  339.          Index           =   12
  340.          Left            =   5160
  341.          TabIndex        =   18
  342.          Top             =   1800
  343.          Width           =   1335
  344.       End
  345.       Begin VB.Label Label2 
  346.          Caption         =   "Label2"
  347.          Height          =   255
  348.          Index           =   11
  349.          Left            =   3600
  350.          TabIndex        =   17
  351.          Top             =   1800
  352.          Width           =   1335
  353.       End
  354.       Begin VB.Label Label2 
  355.          Caption         =   "Label2"
  356.          Height          =   255
  357.          Index           =   10
  358.          Left            =   2040
  359.          TabIndex        =   16
  360.          Top             =   1800
  361.          Width           =   1335
  362.       End
  363.       Begin VB.Label Label2 
  364.          Caption         =   "Label2"
  365.          Height          =   255
  366.          Index           =   9
  367.          Left            =   480
  368.          TabIndex        =   15
  369.          Top             =   1800
  370.          Width           =   1335
  371.       End
  372.       Begin VB.Label Label2 
  373.          Caption         =   "Label2"
  374.          Height          =   255
  375.          Index           =   8
  376.          Left            =   5160
  377.          TabIndex        =   14
  378.          Top             =   1320
  379.          Width           =   1335
  380.       End
  381.       Begin VB.Label Label2 
  382.          Caption         =   "Label2"
  383.          Height          =   255
  384.          Index           =   7
  385.          Left            =   3600
  386.          TabIndex        =   13
  387.          Top             =   1320
  388.          Width           =   1335
  389.       End
  390.       Begin VB.Label Label2 
  391.          Caption         =   "Label2"
  392.          Height          =   255
  393.          Index           =   6
  394.          Left            =   2040
  395.          TabIndex        =   12
  396.          Top             =   1320
  397.          Width           =   1335
  398.       End
  399.       Begin VB.Label Label2 
  400.          Caption         =   "Label2"
  401.          Height          =   255
  402.          Index           =   5
  403.          Left            =   480
  404.          TabIndex        =   11
  405.          Top             =   1320
  406.          Width           =   1335
  407.       End
  408.       Begin VB.Label Label2 
  409.          Caption         =   "Label2"
  410.          Height          =   255
  411.          Index           =   4
  412.          Left            =   5160
  413.          TabIndex        =   10
  414.          Top             =   840
  415.          Width           =   1335
  416.       End
  417.       Begin VB.Label Label2 
  418.          Caption         =   "Label2"
  419.          Height          =   255
  420.          Index           =   3
  421.          Left            =   3600
  422.          TabIndex        =   9
  423.          Top             =   840
  424.          Width           =   1335
  425.       End
  426.       Begin VB.Label Label2 
  427.          Caption         =   "Label2"
  428.          Height          =   255
  429.          Index           =   2
  430.          Left            =   2040
  431.          TabIndex        =   8
  432.          Top             =   840
  433.          Width           =   1335
  434.       End
  435.       Begin VB.Label Label2 
  436.          Caption         =   "Label2"
  437.          Height          =   255
  438.          Index           =   1
  439.          Left            =   480
  440.          TabIndex        =   7
  441.          Top             =   840
  442.          Width           =   1335
  443.       End
  444.       Begin VB.Label Label2 
  445.          Height          =   255
  446.          Index           =   0
  447.          Left            =   120
  448.          TabIndex        =   6
  449.          Top             =   720
  450.          Width           =   1335
  451.          Visible         =   0   'False
  452.       End
  453.       Begin VB.Label Label3 
  454.          AutoSize        =   -1  'True
  455.          Caption         =   "Label3"
  456.          Height          =   225
  457.          Left            =   120
  458.          TabIndex        =   4
  459.          Top             =   480
  460.          Width           =   510
  461.       End
  462.       Begin VB.Label Label1 
  463.          Caption         =   "Label1"
  464.          Height          =   375
  465.          Left            =   120
  466.          TabIndex        =   3
  467.          Top             =   240
  468.          Width           =   2895
  469.       End
  470.    End
  471.    Begin VB.Timer Timer1 
  472.       Interval        =   500
  473.       Left            =   120
  474.       Top             =   4200
  475.    End
  476.    Begin VB.CommandButton cmdQuit 
  477.       Caption         =   "Quit"
  478.       Height          =   492
  479.       Left            =   7200
  480.       TabIndex        =   1
  481.       Top             =   2160
  482.       Width           =   1212
  483.    End
  484.    Begin VB.CommandButton cmdKill 
  485.       BeginProperty Font 
  486.          Name            =   "Comic Sans MS"
  487.          Size            =   7.8
  488.          Charset         =   204
  489.          Weight          =   400
  490.          Underline       =   0   'False
  491.          Italic          =   0   'False
  492.          Strikethrough   =   0   'False
  493.       EndProperty
  494.       Height          =   492
  495.       Left            =   7200
  496.       TabIndex        =   0
  497.       Top             =   120
  498.       Width           =   1212
  499.    End
  500.    Begin VB.Menu mnuFile 
  501.       Caption         =   "&File"
  502.       Begin VB.Menu mnuExit 
  503.          Caption         =   "&Exit"
  504.       End
  505.    End
  506.    Begin VB.Menu MnuSettings 
  507.       Caption         =   "&Settings"
  508.       Begin VB.Menu mnuAdd 
  509.          Caption         =   "&Add Program"
  510.       End
  511.       Begin VB.Menu mnuRemove 
  512.          Caption         =   "Re&move Program"
  513.       End
  514.    End
  515.    Begin VB.Menu mnuOptions 
  516.       Caption         =   "&Options"
  517.       Begin VB.Menu mnuTerappz 
  518.          Caption         =   "&Terminate appz"
  519.       End
  520.       Begin VB.Menu mnuTerone 
  521.          Caption         =   "T&erminate one..."
  522.       End
  523.    End
  524.    Begin VB.Menu mnuHjalp 
  525.       Caption         =   "&Help"
  526.       Begin VB.Menu mnuHelp 
  527.          Caption         =   "H&elp"
  528.       End
  529.       Begin VB.Menu mnuAbout 
  530.          Caption         =   "About Te&rminator"
  531.       End
  532.    End
  533. Attribute VB_Name = "lstProcess"
  534. Attribute VB_GlobalNameSpace = False
  535. Attribute VB_Creatable = False
  536. Attribute VB_PredeclaredId = True
  537. Attribute VB_Exposed = False
  538. Option Explicit
  539. Private Type PROCESSENTRY32
  540.     dwSize As Long
  541.     cntUsage As Long
  542.     th32ProcessID As Long
  543.     th32DefaultHeapID As Long
  544.     th32ModuleID As Long
  545.     cntThreads As Long
  546.     th32ParentProcessID As Long
  547.     pcPriClassBase As Long
  548.     dwFlags As Long
  549.     szExeFile As String * 260
  550. End Type
  551. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  552. Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
  553. Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
  554. Private Declare Function Process32First Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
  555. Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
  556. Private Declare Sub CloseHandle Lib "kernel32" (ByVal hPass As Long)
  557. Dim activeappz(100) As String
  558. Dim removeappz(16) As String
  559. Dim numberofprogz As String
  560. Dim easter As String
  561. Dim counter, j, C As Integer
  562. Dim blinkthread(16) As Boolean
  563. Dim terminate As Boolean
  564. Dim shutoff As Boolean
  565. Dim blink As Boolean
  566. Dim killappz As Boolean
  567. Private Sub cmdQuit_Click()
  568.    If shutoff = False Then Exit Sub
  569.     ' St
  570. ng ner programmet...
  571.     Dim GotoVal, Gointo
  572.     GotoVal = Me.Height / 2
  573.     Me.Caption = "Shuting down..."
  574.     For Gointo = 1 To GotoVal
  575.     DoEvents
  576.         Me.Height = Me.Height - 200
  577.         Me.Top = (Screen.Height - Me.Height) \ 2
  578.         If Me.Height <= 11 Then Exit For
  579.     Next Gointo
  580.     Me.Caption = "Bye.."
  581.     Me.Height = 30
  582.     GotoVal = Me.Width / 2
  583.     For Gointo = 1 To GotoVal
  584.         DoEvents
  585.             Me.Width = Me.Width - 100
  586.             Me.Left = (Screen.Width - Me.Width) \ 2
  587.             If Me.Width <= 11 Then End
  588.     Next Gointo
  589.     End
  590. End Sub
  591. Private Sub cmdKill_Click()
  592.     If killappz = True Then
  593.         Dim hProcess As Long
  594.         hProcess = OpenProcess(&H1F0FFF, 1, lstProcess.ItemData(lstProcess.ListIndex))
  595.         TerminateProcess hProcess, 0
  596.         Call Update
  597.         easter = ""
  598.     End If
  599.     If killappz = False Then
  600.         cmdQuit.Enabled = False
  601.         terminate = True
  602.         Timer2.Interval = 0
  603.         easter = ""
  604.     End If
  605. End Sub
  606. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  607.     easter = easter + Chr(KeyCode)
  608.     If Len(easter) > 3 Then easter = easter +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d5naster +d0U
  609.