home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD14696282001.psc / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-02-08  |  33.4 KB  |  938 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Enumerator Plus "
  6.    ClientHeight    =   6840
  7.    ClientLeft      =   45
  8.    ClientTop       =   615
  9.    ClientWidth     =   7065
  10.    BeginProperty Font 
  11.       Name            =   "MS Sans Serif"
  12.       Size            =   8.25
  13.       Charset         =   0
  14.       Weight          =   700
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H00000000&
  20.    Icon            =   "frmMain.frx":0000
  21.    LinkTopic       =   "Form1"
  22.    MaxButton       =   0   'False
  23.    MinButton       =   0   'False
  24.    MouseIcon       =   "frmMain.frx":0442
  25.    ScaleHeight     =   6840
  26.    ScaleWidth      =   7065
  27.    StartUpPosition =   2  'CenterScreen
  28.    Begin VB.CommandButton cmdSave 
  29.       Caption         =   "&Save All Information "
  30.       BeginProperty Font 
  31.          Name            =   "MS Sans Serif"
  32.          Size            =   8.25
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   375
  40.       Left            =   5115
  41.       TabIndex        =   20
  42.       Top             =   1440
  43.       Width           =   1815
  44.    End
  45.    Begin VB.CommandButton cmdPrint 
  46.       Caption         =   "&Print All Information"
  47.       BeginProperty Font 
  48.          Name            =   "MS Sans Serif"
  49.          Size            =   8.25
  50.          Charset         =   0
  51.          Weight          =   400
  52.          Underline       =   0   'False
  53.          Italic          =   0   'False
  54.          Strikethrough   =   0   'False
  55.       EndProperty
  56.       Height          =   375
  57.       Left            =   5115
  58.       TabIndex        =   19
  59.       Top             =   840
  60.       Width           =   1815
  61.    End
  62.    Begin VB.CommandButton cmdQuit 
  63.       Caption         =   "&Quit"
  64.       BeginProperty Font 
  65.          Name            =   "MS Sans Serif"
  66.          Size            =   8.25
  67.          Charset         =   0
  68.          Weight          =   400
  69.          Underline       =   0   'False
  70.          Italic          =   0   'False
  71.          Strikethrough   =   0   'False
  72.       EndProperty
  73.       Height          =   375
  74.       Left            =   6000
  75.       TabIndex        =   18
  76.       Top             =   6430
  77.       Width           =   975
  78.    End
  79.    Begin VB.Frame Frame1 
  80.       BackColor       =   &H00808000&
  81.       Caption         =   "User/Computer Information"
  82.       ForeColor       =   &H00000080&
  83.       Height          =   4335
  84.       Left            =   120
  85.       TabIndex        =   0
  86.       Top             =   2040
  87.       Width           =   6855
  88.       Begin VB.Label lblProxyStatus 
  89.          BackStyle       =   0  'Transparent
  90.          Caption         =   "Proxy is "
  91.          ForeColor       =   &H8000000E&
  92.          Height          =   255
  93.          Left            =   3600
  94.          TabIndex        =   46
  95.          Top             =   2805
  96.          Width           =   3255
  97.       End
  98.       Begin VB.Label lblWinInstDir 
  99.          BackStyle       =   0  'Transparent
  100.          Caption         =   "Windows Install Directory"
  101.          ForeColor       =   &H8000000E&
  102.          Height          =   255
  103.          Left            =   1920
  104.          TabIndex        =   45
  105.          Top             =   2400
  106.          Width           =   3855
  107.       End
  108.       Begin VB.Label Label18 
  109.          BackStyle       =   0  'Transparent
  110.          Caption         =   "Win. Install Dir:"
  111.          Height          =   255
  112.          Left            =   480
  113.          TabIndex        =   44
  114.          Top             =   2400
  115.          Width           =   1335
  116.       End
  117.       Begin VB.Label lblWinSysDir 
  118.          BackStyle       =   0  'Transparent
  119.          Caption         =   "Windows System Directory"
  120.          ForeColor       =   &H8000000E&
  121.          Height          =   255
  122.          Left            =   1920
  123.          TabIndex        =   43
  124.          Top             =   2160
  125.          Width           =   3375
  126.       End
  127.       Begin VB.Label Label16 
  128.          BackStyle       =   0  'Transparent
  129.          Caption         =   "Windows Sys. Dir:"
  130.          Height          =   255
  131.          Left            =   240
  132.          TabIndex        =   42
  133.          Top             =   2160
  134.          Width           =   1575
  135.       End
  136.       Begin VB.Label lblProdKey 
  137.          BackStyle       =   0  'Transparent
  138.          Caption         =   "Product Key Goes Here if there is one."
  139.          ForeColor       =   &H8000000E&
  140.          Height          =   255
  141.          Left            =   1920
  142.          TabIndex        =   41
  143.          Top             =   1920
  144.          Width           =   3855
  145.       End
  146.       Begin VB.Label Label15 
  147.          BackStyle       =   0  'Transparent
  148.          Caption         =   "Product Key:"
  149.          Height          =   255
  150.          Left            =   680
  151.          TabIndex        =   40
  152.          Top             =   1920
  153.          Width           =   1215
  154.       End
  155.       Begin VB.Label lblProdID 
  156.          BackStyle       =   0  'Transparent
  157.          Caption         =   "Product ID Goes Here"
  158.          ForeColor       =   &H8000000E&
  159.          Height          =   255
  160.          Left            =   1920
  161.          TabIndex        =   39
  162.          Top             =   1680
  163.          Width           =   4815
  164.       End
  165.       Begin VB.Label Label14 
  166.          BackStyle       =   0  'Transparent
  167.          Caption         =   "Product ID:"
  168.          Height          =   255
  169.          Left            =   800
  170.          TabIndex        =   38
  171.          Top             =   1680
  172.          Width           =   1095
  173.       End
  174.       Begin VB.Label lblSysRes 
  175.          BackStyle       =   0  'Transparent
  176.          Caption         =   "% of System Resources That Are Free"
  177.          ForeColor       =   &H8000000E&
  178.          Height          =   255
  179.          Left            =   1920
  180.          TabIndex        =   37
  181.          Top             =   4005
  182.          Width           =   4815
  183.       End
  184.       Begin VB.Label Label13 
  185.          BackStyle       =   0  'Transparent
  186.          Caption         =   "System Resources:"
  187.          Height          =   255
  188.          Left            =   120
  189.          TabIndex        =   36
  190.          Top             =   4005
  191.          Width           =   1695
  192.       End
  193.       Begin VB.Label lblIEVer 
  194.          BackStyle       =   0  'Transparent
  195.          Caption         =   "IE 4.x or Earlier"
  196.          ForeColor       =   &H8000000E&
  197.          Height          =   255
  198.          Left            =   1920
  199.          TabIndex        =   35
  200.          Top             =   2805
  201.          Width           =   1455
  202.       End
  203.       Begin VB.Label Label8 
  204.          BackStyle       =   0  'Transparent
  205.          Caption         =   "I.E. Version:"
  206.          Height          =   255
  207.          Left            =   720
  208.          TabIndex        =   34
  209.          Top             =   2805
  210.          Width           =   1095
  211.       End
  212.       Begin VB.Label lblScreenRes 
  213.          BackStyle       =   0  'Transparent
  214.          Caption         =   "1000 X 1000"
  215.          ForeColor       =   &H8000000E&
  216.          Height          =   255
  217.          Left            =   5280
  218.          TabIndex        =   33
  219.          Top             =   3720
  220.          Width           =   1215
  221.       End
  222.       Begin VB.Label Label7 
  223.          BackStyle       =   0  'Transparent
  224.          Caption         =   "Screen Resolution:"
  225.          Height          =   255
  226.          Left            =   3480
  227.          TabIndex        =   32
  228.          Top             =   3720
  229.          Width           =   1695
  230.       End
  231.       Begin VB.Label lblUser 
  232.          BackStyle       =   0  'Transparent
  233.          Caption         =   "UserName"
  234.          ForeColor       =   &H8000000E&
  235.          Height          =   255
  236.          Left            =   1920
  237.          TabIndex        =   31
  238.          Top             =   240
  239.          Width           =   2895
  240.       End
  241.       Begin VB.Label lblPCName 
  242.          BackStyle       =   0  'Transparent
  243.          Caption         =   "ComputerName"
  244.          ForeColor       =   &H8000000E&
  245.          Height          =   255
  246.          Left            =   1920
  247.          TabIndex        =   30
  248.          Top             =   480
  249.          Width           =   2895
  250.       End
  251.       Begin VB.Label lblWinVer 
  252.          BackStyle       =   0  'Transparent
  253.          Caption         =   "Windows 2000 SP1"
  254.          ForeColor       =   &H8000000E&
  255.          Height          =   255
  256.          Left            =   1920
  257.          TabIndex        =   29
  258.          Top             =   720
  259.          Width           =   3735
  260.       End
  261.       Begin VB.Label lblWinBuild 
  262.          BackStyle       =   0  'Transparent
  263.          Caption         =   "Windows Build"
  264.          ForeColor       =   &H8000000E&
  265.          Height          =   255
  266.          Left            =   1920
  267.          TabIndex        =   28
  268.          Top             =   960
  269.          Width           =   2535
  270.       End
  271.       Begin VB.Label lblRegOrg 
  272.          BackStyle       =   0  'Transparent
  273.          Caption         =   "Registered To Organization"
  274.          ForeColor       =   &H8000000E&
  275.          Height          =   255
  276.          Left            =   1920
  277.          TabIndex        =   27
  278.          Top             =   1440
  279.          Width           =   3615
  280.       End
  281.       Begin VB.Label lblRegPers 
  282.          BackStyle       =   0  'Transparent
  283.          Caption         =   "Registered To Person(s)"
  284.          ForeColor       =   &H8000000E&
  285.          Height          =   255
  286.          Left            =   1920
  287.          TabIndex        =   26
  288.          Top             =   1200
  289.          Width           =   3615
  290.       End
  291.       Begin VB.Label lblMAC 
  292.          BackStyle       =   0  'Transparent
  293.          Caption         =   "NIC's Machine Address"
  294.          ForeColor       =   &H8000000E&
  295.          Height          =   255
  296.          Left            =   1920
  297.          TabIndex        =   25
  298.          Top             =   3360
  299.          Width           =   2655
  300.       End
  301.       Begin VB.Label lblIP 
  302.          BackStyle       =   0  'Transparent
  303.          Caption         =   "PC IP Address"
  304.          ForeColor       =   &H8000000E&
  305.          Height          =   255
  306.          Left            =   1920
  307.          TabIndex        =   24
  308.          Top             =   3120
  309.          Width           =   2535
  310.       End
  311.       Begin VB.Label lblUptime 
  312.          BackStyle       =   0  'Transparent
  313.          Caption         =   "Counting "
  314.          ForeColor       =   &H8000000E&
  315.          Height          =   255
  316.          Left            =   1920
  317.          TabIndex        =   22
  318.          Top             =   3720
  319.          Width           =   1095
  320.       End
  321.       Begin VB.Label Label11 
  322.          BackStyle       =   0  'Transparent
  323.          Caption         =   "PC Uptime:"
  324.          Height          =   255
  325.          Left            =   825
  326.          TabIndex        =   10
  327.          Top             =   3720
  328.          Width           =   975
  329.       End
  330.       Begin VB.Label Label10 
  331.          BackStyle       =   0  'Transparent
  332.          Caption         =   "Machine Address:"
  333.          Height          =   255
  334.          Left            =   240
  335.          TabIndex        =   9
  336.          Top             =   3360
  337.          Width           =   1575
  338.       End
  339.       Begin VB.Label Label9 
  340.          BackStyle       =   0  'Transparent
  341.          Caption         =   "IP Address:"
  342.          Height          =   255
  343.          Left            =   780
  344.          TabIndex        =   8
  345.          Top             =   3120
  346.          Width           =   1095
  347.       End
  348.       Begin VB.Label Label5 
  349.          BackStyle       =   0  'Transparent
  350.          Caption         =   "Registered To:"
  351.          Height          =   255
  352.          Left            =   480
  353.          TabIndex        =   5
  354.          Top             =   1200
  355.          Width           =   1335
  356.       End
  357.       Begin VB.Label Label4 
  358.          BackStyle       =   0  'Transparent
  359.          Caption         =   "Windows Build:"
  360.          Height          =   255
  361.          Left            =   450
  362.          TabIndex        =   4
  363.          Top             =   960
  364.          Width           =   1335
  365.       End
  366.       Begin VB.Label Label3 
  367.          BackStyle       =   0  'Transparent
  368.          Caption         =   "Windows Version:"
  369.          Height          =   255
  370.          Left            =   240
  371.          TabIndex        =   3
  372.          Top             =   720
  373.          Width           =   1575
  374.       End
  375.       Begin VB.Label Label2 
  376.          BackStyle       =   0  'Transparent
  377.          Caption         =   "Computer Name:"
  378.          Height          =   255
  379.          Left            =   375
  380.          TabIndex        =   2
  381.          Top             =   480
  382.          Width           =   1455
  383.       End
  384.       Begin VB.Label Label1 
  385.          BackStyle       =   0  'Transparent
  386.          Caption         =   "User Name:"
  387.          Height          =   255
  388.          Left            =   780
  389.          TabIndex        =   1
  390.          Top             =   240
  391.          Width           =   1020
  392.       End
  393.    End
  394.    Begin VB.CommandButton cmdGetCache 
  395.       BackColor       =   &H00E0E0E0&
  396.       Caption         =   "&Get  Passwords"
  397.       BeginProperty Font 
  398.          Name            =   "MS Sans Serif"
  399.          Size            =   8.25
  400.          Charset         =   0
  401.          Weight          =   400
  402.          Underline       =   0   'False
  403.          Italic          =   0   'False
  404.          Strikethrough   =   0   'False
  405.       EndProperty
  406.       Height          =   375
  407.       Left            =   5115
  408.       MouseIcon       =   "frmMain.frx":0884
  409.       TabIndex        =   17
  410.       Top             =   240
  411.       Width           =   1815
  412.    End
  413.    Begin VB.ListBox List7 
  414.       BackColor       =   &H00FFFFC0&
  415.       BeginProperty Font 
  416.          Name            =   "MS Sans Serif"
  417.          Size            =   8.25
  418.          Charset         =   0
  419.          Weight          =   400
  420.          Underline       =   0   'False
  421.          Italic          =   0   'False
  422.          Strikethrough   =   0   'False
  423.       EndProperty
  424.       ForeColor       =   &H00800000&
  425.       Height          =   1620
  426.       ItemData        =   "frmMain.frx":0CC6
  427.       Left            =   75
  428.       List            =   "frmMain.frx":0CC8
  429.       MultiSelect     =   2  'Extended
  430.       OLEDropMode     =   1  'Manual
  431.       TabIndex        =   6
  432.       Top             =   240
  433.       Width           =   4905
  434.    End
  435.    Begin VB.ListBox List1 
  436.       Height          =   255
  437.       Left            =   4388
  438.       TabIndex        =   11
  439.       Top             =   3000
  440.       Visible         =   0   'False
  441.       Width           =   615
  442.    End
  443.    Begin VB.ListBox List2 
  444.       Height          =   255
  445.       Left            =   4388
  446.       TabIndex        =   12
  447.       Top             =   3240
  448.       Visible         =   0   'False
  449.       Width           =   615
  450.    End
  451.    Begin VB.ListBox List3 
  452.       Height          =   255
  453.       Left            =   4388
  454.       TabIndex        =   13
  455.       Top             =   3480
  456.       Visible         =   0   'False
  457.       Width           =   615
  458.    End
  459.    Begin VB.ListBox List4 
  460.       Height          =   255
  461.       Left            =   4388
  462.       TabIndex        =   14
  463.       Top             =   3720
  464.       Visible         =   0   'False
  465.       Width           =   615
  466.    End
  467.    Begin VB.ListBox List5 
  468.       Height          =   255
  469.       Left            =   4388
  470.       TabIndex        =   15
  471.       Top             =   3960
  472.       Visible         =   0   'False
  473.       Width           =   615
  474.    End
  475.    Begin VB.ListBox List6 
  476.       Height          =   255
  477.       Left            =   4388
  478.       TabIndex        =   16
  479.       Top             =   4200
  480.       Visible         =   0   'False
  481.       Width           =   615
  482.    End
  483.    Begin VB.Timer Timer1 
  484.       Left            =   5468
  485.       Top             =   6360
  486.    End
  487.    Begin VB.ListBox lstParsedItems 
  488.       Height          =   255
  489.       Left            =   480
  490.       TabIndex        =   47
  491.       Top             =   6120
  492.       Visible         =   0   'False
  493.       Width           =   735
  494.    End
  495.    Begin VB.ListBox lstTemp 
  496.       Height          =   255
  497.       Left            =   480
  498.       TabIndex        =   48
  499.       Top             =   6120
  500.       Visible         =   0   'False
  501.       Width           =   735
  502.    End
  503.    Begin VB.ListBox lstProtocol 
  504.       Height          =   255
  505.       Left            =   480
  506.       TabIndex        =   49
  507.       Top             =   6120
  508.       Visible         =   0   'False
  509.       Width           =   735
  510.    End
  511.    Begin VB.ListBox lstPorts 
  512.       Height          =   255
  513.       Left            =   480
  514.       TabIndex        =   50
  515.       Top             =   6120
  516.       Visible         =   0   'False
  517.       Width           =   735
  518.    End
  519.    Begin VB.ListBox lstIP 
  520.       Height          =   255
  521.       Left            =   480
  522.       TabIndex        =   51
  523.       Top             =   6120
  524.       Visible         =   0   'False
  525.       Width           =   735
  526.    End
  527.    Begin VB.Label lblOnOff 
  528.       BackStyle       =   0  'Transparent
  529.       Caption         =   "On"
  530.       ForeColor       =   &H00000000&
  531.       Height          =   255
  532.       Left            =   4450
  533.       TabIndex        =   53
  534.       Top             =   0
  535.       Width           =   495
  536.    End
  537.    Begin VB.Label lblCacheStat 
  538.       BackStyle       =   0  'Transparent
  539.       Caption         =   "Password Caching is "
  540.       ForeColor       =   &H8000000D&
  541.       Height          =   255
  542.       Left            =   2640
  543.       TabIndex        =   52
  544.       Top             =   0
  545.       Width           =   1815
  546.    End
  547.    Begin VB.Label Label6 
  548.       BackStyle       =   0  'Transparent
  549.       ForeColor       =   &H8000000E&
  550.       Height          =   255
  551.       Left            =   2228
  552.       TabIndex        =   23
  553.       Top             =   5280
  554.       Width           =   1575
  555.    End
  556.    Begin VB.Label Label12 
  557.       BackColor       =   &H00C0C000&
  558.       BackStyle       =   0  'Transparent
  559.       Caption         =   "KlineSoft"
  560.       BeginProperty Font 
  561.          Name            =   "Pepita MT"
  562.          Size            =   24
  563.          Charset         =   0
  564.          Weight          =   700
  565.          Underline       =   0   'False
  566.          Italic          =   -1  'True
  567.          Strikethrough   =   0   'False
  568.       EndProperty
  569.       ForeColor       =   &H00800000&
  570.       Height          =   495
  571.       Left            =   2775
  572.       TabIndex        =   21
  573.       Top             =   6360
  574.       Width           =   2175
  575.    End
  576.    Begin VB.Label lblCachePass 
  577.       AutoSize        =   -1  'True
  578.       BackStyle       =   0  'Transparent
  579.       Caption         =   "Cached Passwords"
  580.       ForeColor       =   &H8000000D&
  581.       Height          =   195
  582.       Left            =   195
  583.       TabIndex        =   7
  584.       Top             =   0
  585.       Width           =   1620
  586.    End
  587.    Begin VB.Menu mnuOptions 
  588.       Caption         =   "&Options"
  589.       Visible         =   0   'False
  590.       Begin VB.Menu mnuToggle 
  591.          Caption         =   "&Toggle Proxy On/Off"
  592.       End
  593.    End
  594.    Begin VB.Menu mnuHelp 
  595.       Caption         =   "&Help"
  596.       Begin VB.Menu mnuAbout 
  597.          Caption         =   "&About"
  598.       End
  599.    End
  600. Attribute VB_Name = "frmMain"
  601. Attribute VB_GlobalNameSpace = False
  602. Attribute VB_Creatable = False
  603. Attribute VB_PredeclaredId = True
  604. Attribute VB_Exposed = False
  605. Option Explicit
  606. Private Declare Function GetTickCount& Lib "kernel32" ()
  607. Dim pHold() As String
  608. Dim Hold, Hold2, Hold3 As String
  609. Dim dTmp, tTmp, lTmp, sTmp, lsTmp, fsTmp As String
  610. Dim l1Hold, tOnOff, nl As String
  611. Dim strText, h1, h2 As String
  612. Dim strDelimeter, nType As String
  613. Dim tRes, tType, tUname, tPass As String
  614. Dim hRes, hType, hUname, hPass As String
  615. Dim prxHold As Long
  616. Dim CheckThisFile As String
  617. Dim FileExists As Boolean
  618. Private Sub cmdPrint_Click()
  619.     Dim x As Integer
  620.      'print routine here
  621.     Printer.FontName = "Times New Roman"
  622.     Printer.FontSize = 12
  623.     Printer.FontBold = False         'no bold
  624.     Printer.FontItalic = False       'no italic
  625.     Printer.FontUnderline = False    'no underline
  626.     Printer.FontStrikethru = False   'no strike
  627.     Printer.ForeColor = RGB(0, 0, 0) 'color black
  628.     Printer.FontBold = True
  629.     Printer.FontUnderline = True
  630.     'print a couple of blank lines for a top margin
  631.     Printer.Print ""
  632.     Printer.Print ""
  633.     Printer.Print "Cached Passwords" & "  --- " & Date & "  " & Time
  634.     Printer.Print ""
  635.     Printer.FontBold = False
  636.     Printer.FontUnderline = False
  637.     'Next 3 lines just Print everything in list7
  638.     For x = 0 To List7.ListCount - 1
  639.        Printer.Print List7.List(x)
  640.     Next x
  641.     Printer.NewPage 'Starts a new page.
  642.     Printer.FontBold = True
  643.     Printer.FontUnderline = True
  644.     Printer.Print ""
  645.     Printer.Print ""
  646.     Printer.Print "System Information" & " --- " & Date & "  " & Time
  647.     Printer.Print ""
  648.     Printer.FontBold = False
  649.     Printer.FontUnderline = False
  650.     Printer.Print "User Name:   " & lblUser.Caption
  651.     Printer.Print ""
  652.     Printer.Print "Computer Name:   " & lblPCName.Caption
  653.     Printer.Print ""
  654.     Printer.Print "O/S Version:   " & lblWinVer.Caption
  655.     Printer.Print ""
  656.     Printer.Print "O/S Build:   " & lblWinBuild.Caption
  657.     Printer.Print ""
  658.     Printer.Print "Internet Explorer Version:   " & lblIEVer.Caption & "    " & lblProxyStatus.Caption
  659.     Printer.Print ""
  660.     Printer.Print "Windows Registered To:   " & lblRegPers.Caption
  661.     Printer.Print ""
  662.     Printer.Print "Windows Registered Organization:   " & lblRegOrg.Caption
  663.     Printer.Print ""
  664.     Printer.Print "Windows Product ID:   " & lblProdID.Caption
  665.     Printer.Print ""
  666.     Printer.Print "Windows Product Key:   " & lblProdKey.Caption
  667.     Printer.Print ""
  668.     Printer.Print "Windows System Directory Location:   " & lblWinSysDir.Caption
  669.     Printer.Print ""
  670.     Printer.Print "Windows Install Directory Location:   " & lblWinInstDir.Caption
  671.     Printer.Print ""
  672.     Printer.Print "PC's IP Address:   " & lblIP.Caption
  673.     Printer.Print ""
  674.     Printer.Print "NIC's Machine Address:   " & lblMAC.Caption
  675.     Printer.Print ""
  676.     Printer.Print "PC's Screen Resolution:   " & lblScreenRes.Caption
  677.     Printer.Print ""
  678.     Printer.Print "Available System Resources:   " & lblSysRes.Caption
  679.     Printer.Print ""
  680.     Printer.EndDoc
  681.     MsgBox ("Now Prining The Information"), vbOKOnly
  682. End Sub
  683. Private Sub cmdSave_Click()
  684.     Dim x As Integer
  685. 'This little routine simply appends data to a text file that is
  686. 'located in the same directory as the application.  It names it
  687. 'SysInfo.txt.
  688.     Open App.Path & "\SysInfo.TXT" For Append As #1  'Open the file for append
  689.     Write #1, Date & "   " & Time     'Date and Time Stamps the begining of the textfile
  690.     For x = 0 To List7.ListCount - 1  'Loops through the listbox and writes entry to file until end of listbox
  691.         If List7.List(x) = " " Then
  692.             Write #1, "_____________________________________"  'Used to seperate Cache Entries
  693.         Else
  694.             Write #1, List7.List(x)
  695.         End If
  696.     Next x  'Loop back to the For x and get next item in list7
  697.     Write #1, "User Name:   " & lblUser.Caption
  698.     Write #1, "Computer Name:   " & lblPCName.Caption
  699.     Write #1, "O/S Version:   " & lblWinVer.Caption
  700.     Write #1, "O/S Build:   " & lblWinBuild.Caption
  701.     Write #1, "Internet Explorer Version:   " & lblIEVer.Caption & "    " & lblProxyStatus.Caption
  702.     Write #1, "Windows Registered To:   " & lblRegPers.Caption
  703.     Write #1, "Windows Registered Organization:   " & lblRegOrg.Caption
  704.     Write #1, "Windows Product ID:   " & lblProdID.Caption
  705.     Write #1, "Windows Product Key:   " & lblProdKey.Caption
  706.     Write #1, "Windows System Directory Location:   " & lblWinSysDir.Caption
  707.     Write #1, "Windows Install Directory Location:   " & lblWinInstDir.Caption
  708.     Write #1, "PC's IP Address:   " & lblIP.Caption
  709.     Write #1, "NIC's Machine Address:   " & lblMAC.Caption
  710.     Write #1, "PC's Screen Resolution:   " & lblScreenRes.Caption
  711.     Write #1, "Available System Resources:   " & lblSysRes.Caption
  712.     Close #1   'Close the file
  713.     MsgBox ("Data Has Been Saved To " & App.Path & "\SysInfo.txt  "), vbOKOnly
  714. End Sub
  715. Private Sub Form_Load()
  716.     Dim x
  717.     Dim y
  718.     On Error Resume Next
  719.     Timer1.Interval = 1
  720.     'The following 2 lines add the Program's Version info to the Window title.
  721.     Me.Caption = Me.Caption & App.Major & "." & App.Minor & "." & _
  722.     App.Revision
  723.     lblUser.Caption = GetUserName 'call the GetUserName function from modGetUser
  724.     lblPCName.Caption = GetPCName
  725.     GetWinVer
  726.     lblWinVer.Caption = wVer
  727.     lblWinBuild.Caption = wBld
  728.     ChkForDLL  'Calls sub ChkForDLL from modChkIEDll
  729.     If DLLExists = True Then
  730.         lblIEVer.Caption = GetIEVersion(lMajor, lMinor, lBuild) 'Calls GetIEVersion function from modGetIEVer
  731.     End If
  732.     GetRegInfo  'Calls public sub GetRegInfo from modRegInfo
  733.     'Begin check to see if pasword cacheing has been disabled
  734.     If caOnOff = 0 Then 'It's still enabled which is Windows default
  735.         lblOnOff.ForeColor = &H8000& 'Green
  736.         lblOnOff = "On"
  737.     Else
  738.         lblOnOff.ForeColor = &HC0&   'Red
  739.         lblOnOff = "Off"  'Someone has disabled pass cache in registry
  740.     End If
  741.     'End check for disabled password cacheing
  742.     lblRegPers.Caption = RegPer  'Shows Registered owner
  743.     lblRegOrg.Caption = RegOrg   'Shows Registered Organization
  744.     lblProdID = PID              'Shows Windows Product ID
  745.     lblProdKey = pKey            'Shows Windows Product Key if there is one
  746.     lblWinSysDir = WinSysDir     'Shows Windows System Directory
  747.     lblWinInstDir = WinInstDir   'Shows Windows Install Directory (Where the CAB files are)
  748.     ParseIt  'Calls the ParseIt sub in modProxy and parses proxy info.
  749.     prxHold = phOnOff  'sets prxHold to either 1 for enabled or 0 for disabled
  750.     If phOnOff = 1 Then  'Proxy is on
  751.         tOnOff = "On"    'Sets label to ON
  752.     Else
  753.         tOnOff = "Off"  'Proxy is off
  754.         strIP = "N/A"   'Set label to OFF
  755.     End If
  756.     lblProxyStatus = "Proxy is  " & tOnOff & "  at  " & strIP 'Displays proxy status and Address
  757.     lblIP.Caption = GetIPAddress  'Calls GetIPAddress from modGetIP
  758.     lblMAC.Caption = GetMACAddress() 'Calls GetMACAddress from modGetMAC
  759.     'These 3 lines get and display the screen resolution
  760.     x = Str$(GetSystemMetrics(SM_CXSCREEN))  'Screen Width
  761.     y = Str$(GetSystemMetrics(SM_CYSCREEN))  'Screen Height
  762.     lblScreenRes = x & "  X " & y
  763.     'Next 4 lines get and display Available System Resources
  764.     strFSR = "Free: " + CStr(GetFreeResources(GFSR_SYSTEMRESOURCES)) + "%"
  765.     strFGDIR = "  GDI: " + CStr(GetFreeResources(GFSR_GDIRESOURCES)) + "%"
  766.     strFUR = "  User: " + CStr(GetFreeResources(GFSR_USERRESOURCES)) + "%"
  767.     lblSysRes = strFSR & strFGDIR & strFUR
  768.      If Err Then
  769.         MsgBox "Error: " & Err.Number & Chr(10) & Err.Description, vbOKOnly + vbCritical, "Error: " & Err.Number
  770.      End If
  771.      
  772. End Sub
  773. Private Sub cmdGetCache_Click()
  774.     Dim i, B As Integer
  775.     If lblOnOff = "Off" Then
  776.         MsgBox ("Password Cacheing Has Been Turned Off"), vbOKOnly
  777.         Exit Sub  'Exit cause there is nothing to process.
  778.      End If
  779.         
  780.     Call GetPasswords  'calls the routine to get data into 2 hidden list boxes.
  781.  'Begin code to parse username from hidden listbox 2 where they would look like
  782.  'user:pass and splits it into user in listbox 3 and password in listbox 4.
  783.  'it will also look for type 6 (dialup) from listbox 1 and parse the password
  784.  'from the end of the string just after the last "\" and will add this to
  785.  'listbox 3.  If there is no username then it wirtes "No Username" to listbox3.
  786.     For i = 0 To List2.ListCount - 1
  787.             Hold = List2.List(i)
  788.             l1Hold = List1.List(i)
  789.             pHold() = Split(Hold, ":", -1)
  790.             dTmp = InStr(1, Hold, ":", vbBinaryCompare)
  791.             tTmp = 0
  792.             tTmp = Right(l1Hold, 1) 'Get the last charector in list1
  793.             If tTmp = "6" Then  'if 6 then its a dialup type
  794.                 tTmp = 1  'temp string used like a switch
  795.             Else
  796.                 tTmp = 0
  797.             End If
  798.             If dTmp = 0 Then
  799.                 List4.AddItem Hold
  800.                 
  801.                 If tTmp = 0 Then
  802.                     List3.AddItem "No Username" 'Display this if no username found
  803.                 Else
  804.                     strDelimeter = "\"
  805.                     
  806.                     If InStrRev(l1Hold, strDelimeter) > 0 Then
  807.                          sTmp = Mid(l1Hold, InStrRev(l1Hold, strDelimeter) + 1)
  808.                          lsTmp = Len(sTmp) - 3
  809.                          fsTmp = Left(sTmp, lsTmp)
  810.                          List3.AddItem fsTmp
  811.                     End If
  812.                  End If
  813.          
  814.             GoTo NoDel
  815.             End If
  816.             Hold2 = pHold(B)
  817.             Hold2 = Left(Hold2, dTmp)
  818.             List3.AddItem Hold2
  819.             Hold3 = pHold(B)
  820.             lTmp = Len(Hold) - dTmp
  821.             Hold3 = Right(Hold, lTmp)
  822.             List4.AddItem Hold3
  823.         GoTo NoDel
  824. NoDel:
  825.     Next i
  826. 'End code to parse username:password from hidden listbox2 to hidden
  827. 'listboxes 3 and 4.
  828.  'Begin code to parse the type (X.nType) from the 1st listbox.
  829.     For i = 0 To List1.ListCount - 1
  830.         sTmp = List1.List(i)
  831.         If Right(sTmp, 1) = "3" Then nType = "3 (Share)"
  832.         If Right(sTmp, 1) = "4" Then nType = "4 (MAPI)"
  833.         If Right(sTmp, 1) = "6" Then nType = "6 (DialUP)"
  834.         If Right(sTmp, 1) = "9" Then nType = "19 (Internet Explorer)"
  835.         If Right(sTmp, 1) <> "9" Then
  836.             lsTmp = Len(sTmp) - 3
  837.         Else
  838.             lsTmp = Len(sTmp) - 4
  839.         End If
  840.         fsTmp = Left(sTmp, lsTmp)
  841.         List5.AddItem fsTmp
  842.         List6.AddItem nType
  843.     Next i
  844.  'End parse type code.
  845.  'Begin code to write all above gathered data to a textbox with readable
  846.  'formatting.
  847.     Dim eCount As String
  848.     eCount = 1
  849.     For i = 0 To List5.ListCount - 1
  850.         nl = "Entry " & eCount  'Header and counter
  851.         tRes = List5.List(i)    'Get RAW Resource Info
  852.         h1 = Len(tRes)          'Count len of resource info
  853.         h2 = h1 - 3             'Subtract 3 from length an put in h2
  854.         tRes = Right(tRes, h2)  'Get stripped (finished) resource data
  855.         hRes = " RESOURCE: "
  856.         tType = List6.List(i)
  857.         hType = "            TYPE:  "
  858.         tUname = List3.List(i)
  859.         hUname = " USERNAME:  "
  860.         tPass = List4.List(i)
  861.         hPass = "PASSWORD:  "
  862.         'next 6 lines populate the final listbox (list7) with info gathered above.
  863.         List7.AddItem nl
  864.         List7.AddItem hRes & tRes
  865.         List7.AddItem hType & tType
  866.         List7.AddItem hUname & tUname
  867.         List7.AddItem hPass & tPass
  868.         List7.AddItem " "
  869.         eCount = eCount + 1  'Just adds 1 to counter
  870.     Next i  'Loops back to the For I until all items in list5 have been processed
  871. End Sub
  872. Private Sub cmdQuit_Click()
  873.     QuitProg   'Calls QuitProg sub from modStartStop
  874. End Sub
  875. Private Sub GradientFill() ' Thanks to John Coleman for this gradient code
  876.     'This just gives the form its cool color.
  877.     Dim i As Long
  878.     Dim c As Integer
  879.     Dim r As Double
  880.     r = ScaleHeight * 2.3
  881.     If ScaleHeight = 0 Then GoTo errHand
  882.     For i = 0 To ScaleHeight
  883.         c = Abs(220 * Sin(i / r))
  884.         Me.Line (0, i)-(ScaleWidth, i), RGB(c, c, c + 30)
  885.     Next
  886. errHand: Exit Sub
  887. End Sub
  888. Private Sub Form_Resize() 'This calls the above sub to give form its color.
  889.     'GradientFill
  890. End Sub
  891. Private Sub mnuAbout_Click()
  892.     frmAbout.Show 1
  893. End Sub
  894. Private Sub mnuToggle_Click()
  895. 'This menu item is hidden but does work.  The only problem is you
  896. 'have to restart the program to see the status switch so I am still
  897. 'working on this.
  898.     If prxHold = 1 Then
  899.         prxHold = 0
  900.     ElseIf phOnOff = 0 Then
  901.         prxHold = 1
  902.     End If
  903.     Call SetDWORDValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", prxHold)
  904.     'GetRegInfo
  905. End Sub
  906. Private Sub Timer1_Timer()
  907.     Dim strHours As Long, strMinutes As Long, strSeconds As Long
  908.     Dim strRaw As Long
  909.     'The line below gets the tickcount and then divides
  910.     'it by 1000 so you get the total whole number of seconds
  911.     strRaw = GetTickCount \ 1000
  912.     'Finds number of whole hours
  913.     strHours = strRaw \ 3600
  914.     'subtracts the number of whole hours
  915.     strRaw = strRaw - (strHours * 3600)
  916.     'finds the number of whole minutes
  917.     strMinutes = strRaw \ 60
  918.     'subtract the number of minutes
  919.     strRaw = strRaw - (strMinutes * 60)
  920.     'sets the last part as seconds
  921.     strSeconds = strRaw
  922.     '"Below" put a "0" in front of the number
  923.     'if the number of seconds/minutes is below 10
  924.     If strMinutes < 10 Then
  925.         If strSeconds < 10 Then
  926.             lblUptime.Caption = strHours & ":0" & strMinutes & ":0" & strSeconds
  927.         Else
  928.             lblUptime.Caption = strHours & ":0" & strMinutes & ":" & strSeconds
  929.         End If
  930.     Else
  931.         If strSeconds < 10 Then
  932.             lblUptime.Caption = strHours & ":" & strMinutes & ":0" & strSeconds
  933.         Else
  934.             lblUptime.Caption = strHours & ":" & strMinutes & ":" & strSeconds
  935.         End If
  936.     End If
  937. End Sub
  938.