home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / exploer / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-22  |  48.3 KB  |  1,365 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Begin VB.Form frmMain 
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Explorer Sample"
  7.    ClientHeight    =   8070
  8.    ClientLeft      =   150
  9.    ClientTop       =   720
  10.    ClientWidth     =   10440
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   8070
  13.    ScaleWidth      =   10440
  14.    StartUpPosition =   3  'Windows Default
  15.    Begin VB.Timer Timer1 
  16.       Left            =   9840
  17.       Top             =   2280
  18.    End
  19.    Begin VB.FileListBox File1 
  20.       Height          =   285
  21.       Hidden          =   -1  'True
  22.       Left            =   9240
  23.       System          =   -1  'True
  24.       TabIndex        =   14
  25.       Top             =   1440
  26.       Visible         =   0   'False
  27.       Width           =   1215
  28.    End
  29.    Begin VB.DirListBox Dir1 
  30.       Height          =   315
  31.       Left            =   9240
  32.       TabIndex        =   13
  33.       Top             =   1080
  34.       Visible         =   0   'False
  35.       Width           =   1215
  36.    End
  37.    Begin VB.DriveListBox Drive1 
  38.       Height          =   315
  39.       Left            =   9240
  40.       TabIndex        =   12
  41.       Top             =   720
  42.       Visible         =   0   'False
  43.       Width           =   1215
  44.    End
  45.    Begin VB.PictureBox Picture3 
  46.       AutoSize        =   -1  'True
  47.       Height          =   615
  48.       Left            =   5520
  49.       ScaleHeight     =   555
  50.       ScaleWidth      =   555
  51.       TabIndex        =   11
  52.       Top             =   6120
  53.       Visible         =   0   'False
  54.       Width           =   615
  55.    End
  56.    Begin VB.PictureBox Picture2 
  57.       AutoSize        =   -1  'True
  58.       Height          =   615
  59.       Left            =   4800
  60.       ScaleHeight     =   555
  61.       ScaleWidth      =   555
  62.       TabIndex        =   10
  63.       Top             =   6120
  64.       Visible         =   0   'False
  65.       Width           =   615
  66.    End
  67.    Begin VB.PictureBox Picture1 
  68.       AutoSize        =   -1  'True
  69.       Height          =   615
  70.       Left            =   4080
  71.       ScaleHeight     =   555
  72.       ScaleWidth      =   555
  73.       TabIndex        =   9
  74.       Top             =   6120
  75.       Visible         =   0   'False
  76.       Width           =   615
  77.    End
  78.    Begin VB.TextBox txtValue 
  79.       Height          =   495
  80.       Left            =   4080
  81.       TabIndex        =   8
  82.       Top             =   5520
  83.       Visible         =   0   'False
  84.       Width           =   4695
  85.    End
  86.    Begin MSComctlLib.ImageList ImageList3 
  87.       Left            =   9240
  88.       Top             =   3000
  89.       _ExtentX        =   1005
  90.       _ExtentY        =   1005
  91.       BackColor       =   -2147483643
  92.       ImageWidth      =   16
  93.       ImageHeight     =   16
  94.       MaskColor       =   12632256
  95.       _Version        =   393216
  96.    End
  97.    Begin MSComctlLib.ImageList ImageList2 
  98.       Left            =   9240
  99.       Top             =   2400
  100.       _ExtentX        =   1005
  101.       _ExtentY        =   1005
  102.       BackColor       =   -2147483643
  103.       MaskColor       =   12632256
  104.       _Version        =   393216
  105.    End
  106.    Begin MSComctlLib.ImageList ImageList1 
  107.       Left            =   9240
  108.       Top             =   1800
  109.       _ExtentX        =   1005
  110.       _ExtentY        =   1005
  111.       BackColor       =   -2147483643
  112.       MaskColor       =   12632256
  113.       _Version        =   393216
  114.    End
  115.    Begin VB.PictureBox picSplitter 
  116.       BackColor       =   &H00808080&
  117.       BorderStyle     =   0  'None
  118.       FillColor       =   &H00808080&
  119.       Height          =   4800
  120.       Left            =   9120
  121.       ScaleHeight     =   2090.126
  122.       ScaleMode       =   0  'User
  123.       ScaleWidth      =   780
  124.       TabIndex        =   7
  125.       Top             =   720
  126.       Visible         =   0   'False
  127.       Width           =   72
  128.    End
  129.    Begin MSComctlLib.TreeView tvTreeView 
  130.       Height          =   4800
  131.       Left            =   0
  132.       TabIndex        =   6
  133.       Top             =   720
  134.       Width           =   3330
  135.       _ExtentX        =   5874
  136.       _ExtentY        =   8467
  137.       _Version        =   393217
  138.       Style           =   7
  139.       SingleSel       =   -1  'True
  140.       ImageList       =   "ImageList3"
  141.       BorderStyle     =   1
  142.       Appearance      =   1
  143.    End
  144.    Begin MSComctlLib.ListView lvListView 
  145.       Height          =   4800
  146.       Left            =   3360
  147.       TabIndex        =   5
  148.       Top             =   720
  149.       Width           =   5730
  150.       _ExtentX        =   10107
  151.       _ExtentY        =   8467
  152.       Arrange         =   2
  153.       LabelEdit       =   1
  154.       Sorted          =   -1  'True
  155.       MultiSelect     =   -1  'True
  156.       LabelWrap       =   -1  'True
  157.       HideSelection   =   0   'False
  158.       AllowReorder    =   -1  'True
  159.       FullRowSelect   =   -1  'True
  160.       HotTracking     =   -1  'True
  161.       _Version        =   393217
  162.       Icons           =   "ImageList1"
  163.       SmallIcons      =   "ImageList2"
  164.       ForeColor       =   -2147483640
  165.       BackColor       =   -2147483643
  166.       BorderStyle     =   1
  167.       Appearance      =   1
  168.       NumItems        =   4
  169.       BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
  170.          Text            =   "Name"
  171.          Object.Width           =   2540
  172.       EndProperty
  173.       BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
  174.          SubItemIndex    =   1
  175.          Text            =   "in"
  176.          Object.Width           =   2540
  177.       EndProperty
  178.       BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
  179.          SubItemIndex    =   2
  180.          Text            =   "Size"
  181.          Object.Width           =   2540
  182.       EndProperty
  183.       BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
  184.          SubItemIndex    =   3
  185.          Text            =   "Type"
  186.          Object.Width           =   2540
  187.       EndProperty
  188.    End
  189.    Begin VB.PictureBox picTitles 
  190.       Align           =   1  'Align Top
  191.       Appearance      =   0  'Flat
  192.       BorderStyle     =   0  'None
  193.       ForeColor       =   &H80000008&
  194.       Height          =   300
  195.       Left            =   0
  196.       ScaleHeight     =   300
  197.       ScaleWidth      =   10440
  198.       TabIndex        =   2
  199.       TabStop         =   0   'False
  200.       Top             =   420
  201.       Width           =   10440
  202.       Begin VB.Label lblTitle 
  203.          BorderStyle     =   1  'Fixed Single
  204.          Caption         =   " ListView:"
  205.          Height          =   270
  206.          Index           =   1
  207.          Left            =   2078
  208.          TabIndex        =   4
  209.          Tag             =   " ListView:"
  210.          Top             =   12
  211.          Width           =   3216
  212.       End
  213.       Begin VB.Label lblTitle 
  214.          BorderStyle     =   1  'Fixed Single
  215.          Caption         =   " TreeView:"
  216.          Height          =   270
  217.          Index           =   0
  218.          Left            =   0
  219.          TabIndex        =   3
  220.          Tag             =   " TreeView:"
  221.          Top             =   12
  222.          Width           =   2016
  223.       End
  224.    End
  225.    Begin MSComctlLib.Toolbar tbToolBar 
  226.       Align           =   1  'Align Top
  227.       Height          =   420
  228.       Left            =   0
  229.       TabIndex        =   1
  230.       Top             =   0
  231.       Width           =   10440
  232.       _ExtentX        =   18415
  233.       _ExtentY        =   741
  234.       ButtonWidth     =   609
  235.       ButtonHeight    =   582
  236.       Appearance      =   1
  237.       ImageList       =   "imlToolbarIcons"
  238.       _Version        =   393216
  239.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  240.          NumButtons      =   16
  241.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  242.             Key             =   "Cut"
  243.             Object.ToolTipText     =   "Cut"
  244.             ImageKey        =   "Cut"
  245.          EndProperty
  246.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  247.             Key             =   "Copy"
  248.             Object.ToolTipText     =   "Copy"
  249.             ImageKey        =   "Copy"
  250.          EndProperty
  251.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  252.             Key             =   "Paste"
  253.             Object.ToolTipText     =   "Paste"
  254.             ImageKey        =   "Paste"
  255.          EndProperty
  256.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  257.             Key             =   "Delete"
  258.             Object.ToolTipText     =   "Delete"
  259.             ImageKey        =   "Delete"
  260.          EndProperty
  261.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  262.             Style           =   3
  263.          EndProperty
  264.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  265.             Key             =   "Properties"
  266.             Object.ToolTipText     =   "Properties"
  267.             ImageKey        =   "Properties"
  268.          EndProperty
  269.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  270.             Style           =   3
  271.          EndProperty
  272.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  273.             Key             =   "Up One Level"
  274.             Object.ToolTipText     =   "Up One Level"
  275.             ImageKey        =   "Up One Level"
  276.          EndProperty
  277.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  278.             Key             =   "Map Network Drive"
  279.             Object.ToolTipText     =   "Map Network Drive"
  280.             ImageKey        =   "Map Network Drive"
  281.          EndProperty
  282.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  283.             Key             =   "Find"
  284.             Object.ToolTipText     =   "Find"
  285.             ImageKey        =   "Find"
  286.          EndProperty
  287.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  288.             Key             =   "Help"
  289.             Object.ToolTipText     =   "Help"
  290.             ImageKey        =   "Help"
  291.          EndProperty
  292.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  293.             Style           =   3
  294.          EndProperty
  295.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  296.             Key             =   "View Large Icons"
  297.             Object.ToolTipText     =   "View Large Icons"
  298.             ImageKey        =   "View Large Icons"
  299.             Style           =   2
  300.          EndProperty
  301.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  302.             Key             =   "View Small Icons"
  303.             Object.ToolTipText     =   "View Small Icons"
  304.             ImageKey        =   "View Small Icons"
  305.             Style           =   2
  306.          EndProperty
  307.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  308.             Key             =   "View List"
  309.             Object.ToolTipText     =   "View List"
  310.             ImageKey        =   "View List"
  311.             Style           =   2
  312.          EndProperty
  313.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  314.             Key             =   "View Details"
  315.             Object.ToolTipText     =   "View Details"
  316.             ImageKey        =   "View Details"
  317.             Style           =   2
  318.          EndProperty
  319.       EndProperty
  320.    End
  321.    Begin MSComctlLib.StatusBar sbStatusBar 
  322.       Align           =   2  'Align Bottom
  323.       Height          =   270
  324.       Left            =   0
  325.       TabIndex        =   0
  326.       Top             =   7800
  327.       Width           =   10440
  328.       _ExtentX        =   18415
  329.       _ExtentY        =   476
  330.       _Version        =   393216
  331.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  332.          NumPanels       =   3
  333.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  334.             AutoSize        =   1
  335.             Object.Width           =   13229
  336.             Text            =   "Free Space :"
  337.             TextSave        =   "Free Space :"
  338.          EndProperty
  339.          BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  340.             Style           =   6
  341.             AutoSize        =   2
  342.             TextSave        =   "9/22/99"
  343.          EndProperty
  344.          BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  345.             Style           =   5
  346.             AutoSize        =   2
  347.             TextSave        =   "3:57 PM"
  348.          EndProperty
  349.       EndProperty
  350.    End
  351.    Begin MSComDlg.CommonDialog dlgCommonDialog 
  352.       Left            =   9840
  353.       Top             =   1800
  354.       _ExtentX        =   847
  355.       _ExtentY        =   847
  356.       _Version        =   393216
  357.    End
  358.    Begin MSComctlLib.ImageList imlToolbarIcons 
  359.       Left            =   9240
  360.       Top             =   3600
  361.       _ExtentX        =   1005
  362.       _ExtentY        =   1005
  363.       BackColor       =   -2147483643
  364.       ImageWidth      =   16
  365.       ImageHeight     =   16
  366.       MaskColor       =   12632256
  367.       _Version        =   393216
  368.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  369.          NumListImages   =   13
  370.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  371.             Picture         =   "frmMain.frx":0000
  372.             Key             =   "Cut"
  373.          EndProperty
  374.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  375.             Picture         =   "frmMain.frx":0112
  376.             Key             =   "Copy"
  377.          EndProperty
  378.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  379.             Picture         =   "frmMain.frx":0224
  380.             Key             =   "Paste"
  381.          EndProperty
  382.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  383.             Picture         =   "frmMain.frx":0336
  384.             Key             =   "Delete"
  385.          EndProperty
  386.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  387.             Picture         =   "frmMain.frx":0448
  388.             Key             =   "Properties"
  389.          EndProperty
  390.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  391.             Picture         =   "frmMain.frx":055A
  392.             Key             =   "Up One Level"
  393.          EndProperty
  394.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  395.             Picture         =   "frmMain.frx":066C
  396.             Key             =   "Map Network Drive"
  397.          EndProperty
  398.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  399.             Picture         =   "frmMain.frx":077E
  400.             Key             =   "Find"
  401.          EndProperty
  402.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  403.             Picture         =   "frmMain.frx":0890
  404.             Key             =   "Help"
  405.          EndProperty
  406.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  407.             Picture         =   "frmMain.frx":09A2
  408.             Key             =   "View Large Icons"
  409.          EndProperty
  410.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  411.             Picture         =   "frmMain.frx":0AB4
  412.             Key             =   "View Small Icons"
  413.          EndProperty
  414.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  415.             Picture         =   "frmMain.frx":0BC6
  416.             Key             =   "View List"
  417.          EndProperty
  418.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  419.             Picture         =   "frmMain.frx":0CD8
  420.             Key             =   "View Details"
  421.          EndProperty
  422.       EndProperty
  423.    End
  424.    Begin VB.Image imgSplitter 
  425.       Height          =   4785
  426.       Left            =   3360
  427.       MousePointer    =   9  'Size W E
  428.       Top             =   720
  429.       Width           =   150
  430.    End
  431.    Begin VB.Menu mnuFile 
  432.       Caption         =   "&File"
  433.       Begin VB.Menu mnuFileOpen 
  434.          Caption         =   "&Open..."
  435.       End
  436.       Begin VB.Menu mnuFileFind 
  437.          Caption         =   "&Find"
  438.       End
  439.       Begin VB.Menu mnuFileBar0 
  440.          Caption         =   "-"
  441.       End
  442.       Begin VB.Menu mnuFileSendTo 
  443.          Caption         =   "Sen&d to"
  444.       End
  445.       Begin VB.Menu mnuFileBar1 
  446.          Caption         =   "-"
  447.       End
  448.       Begin VB.Menu mnuFileNew 
  449.          Caption         =   "&New"
  450.          Shortcut        =   ^N
  451.       End
  452.       Begin VB.Menu mnuFileBar2 
  453.          Caption         =   "-"
  454.       End
  455.       Begin VB.Menu mnuFileDelete 
  456.          Caption         =   "&Delete"
  457.       End
  458.       Begin VB.Menu mnuFileRename 
  459.          Caption         =   "Rena&me"
  460.       End
  461.       Begin VB.Menu mnuFileProperties 
  462.          Caption         =   "Propert&ies"
  463.       End
  464.       Begin VB.Menu mnuFileBar3 
  465.          Caption         =   "-"
  466.       End
  467.       Begin VB.Menu mnuFileMRU 
  468.          Caption         =   ""
  469.          Index           =   1
  470.          Visible         =   0   'False
  471.       End
  472.       Begin VB.Menu mnuFileMRU 
  473.          Caption         =   ""
  474.          Index           =   2
  475.          Visible         =   0   'False
  476.       End
  477.       Begin VB.Menu mnuFileMRU 
  478.          Caption         =   ""
  479.          Index           =   3
  480.          Visible         =   0   'False
  481.       End
  482.       Begin VB.Menu mnuFileBar4 
  483.          Caption         =   "-"
  484.          Visible         =   0   'False
  485.       End
  486.       Begin VB.Menu mnuFileBar5 
  487.          Caption         =   "-"
  488.       End
  489.       Begin VB.Menu mnuFileClose 
  490.          Caption         =   "&Close"
  491.       End
  492.    End
  493.    Begin VB.Menu mnuEdit 
  494.       Caption         =   "&Edit"
  495.       Begin VB.Menu mnuEditUndo 
  496.          Caption         =   "&Undo"
  497.       End
  498.       Begin VB.Menu mnuEditBar0 
  499.          Caption         =   "-"
  500.       End
  501.       Begin VB.Menu mnuEditCut 
  502.          Caption         =   "Cu&t"
  503.          Shortcut        =   ^X
  504.       End
  505.       Begin VB.Menu mnuEditCopy 
  506.          Caption         =   "&Copy"
  507.          Shortcut        =   ^C
  508.       End
  509.       Begin VB.Menu mnuEditPaste 
  510.          Caption         =   "&Paste"
  511.          Shortcut        =   ^V
  512.       End
  513.       Begin VB.Menu mnuEditPasteSpecial 
  514.          Caption         =   "Paste &Special..."
  515.       End
  516.       Begin VB.Menu mnuEditBar1 
  517.          Caption         =   "-"
  518.       End
  519.       Begin VB.Menu mnuEditSelectAll 
  520.          Caption         =   "Select &All"
  521.          Shortcut        =   ^A
  522.       End
  523.       Begin VB.Menu mnuEditInvertSelection 
  524.          Caption         =   "&Invert Selection"
  525.       End
  526.    End
  527.    Begin VB.Menu mnuView 
  528.       Caption         =   "&View"
  529.       Begin VB.Menu mnuViewToolbar 
  530.          Caption         =   "&Toolbar"
  531.          Checked         =   -1  'True
  532.       End
  533.       Begin VB.Menu mnuViewStatusBar 
  534.          Caption         =   "Status &Bar"
  535.          Checked         =   -1  'True
  536.       End
  537.       Begin VB.Menu mnuViewBar0 
  538.          Caption         =   "-"
  539.       End
  540.       Begin VB.Menu mnuListViewMode 
  541.          Caption         =   "Lar&ge Icons"
  542.          Index           =   0
  543.       End
  544.       Begin VB.Menu mnuListViewMode 
  545.          Caption         =   "S&mall Icons"
  546.          Index           =   1
  547.       End
  548.       Begin VB.Menu mnuListViewMode 
  549.          Caption         =   "&List"
  550.          Index           =   2
  551.       End
  552.       Begin VB.Menu mnuListViewMode 
  553.          Caption         =   "&Details"
  554.          Index           =   3
  555.       End
  556.       Begin VB.Menu mnuViewBar1 
  557.          Caption         =   "-"
  558.       End
  559.       Begin VB.Menu mnuViewArrangeIcons 
  560.          Caption         =   "Arrange &Icons"
  561.          Begin VB.Menu mnuByName 
  562.             Caption         =   "By name"
  563.          End
  564.          Begin VB.Menu mnuByType 
  565.             Caption         =   "By Type"
  566.          End
  567.          Begin VB.Menu mnuBySize 
  568.             Caption         =   "By size"
  569.          End
  570.          Begin VB.Menu mnuViewBar3 
  571.             Caption         =   "-"
  572.          End
  573.          Begin VB.Menu mnuAutoArrange 
  574.             Caption         =   "Auto"
  575.          End
  576.       End
  577.       Begin VB.Menu mnuViewBar2 
  578.          Caption         =   "-"
  579.       End
  580.       Begin VB.Menu mnuViewRefresh 
  581.          Caption         =   "&Refresh"
  582.       End
  583.       Begin VB.Menu mnuViewOptions 
  584.          Caption         =   "&Options..."
  585.       End
  586.       Begin VB.Menu mnuViewWebBrowser 
  587.          Caption         =   "&Web Browser"
  588.       End
  589.    End
  590.    Begin VB.Menu mnuTools 
  591.       Caption         =   "&Tools"
  592.       Begin VB.Menu mnuFind 
  593.          Caption         =   "&Find"
  594.       End
  595.       Begin VB.Menu mnuToolsOptions 
  596.          Caption         =   "&Options..."
  597.       End
  598.    End
  599.    Begin VB.Menu mnuHelp 
  600.       Caption         =   "&Help"
  601.       Begin VB.Menu mnuHelpContents 
  602.          Caption         =   "&Contents"
  603.       End
  604.       Begin VB.Menu mnuHelpSearchForHelpOn 
  605.          Caption         =   "&Search For Help On..."
  606.       End
  607.       Begin VB.Menu mnuHelpBar0 
  608.          Caption         =   "-"
  609.       End
  610.       Begin VB.Menu mnuHelpAbout 
  611.          Caption         =   "&About "
  612.       End
  613.    End
  614.    Begin VB.Menu mnuFilePopUp 
  615.       Caption         =   "FilePopUp"
  616.       Visible         =   0   'False
  617.       Begin VB.Menu mnuPopUpRename 
  618.          Caption         =   "Rename"
  619.       End
  620.       Begin VB.Menu mnuPopProperties 
  621.          Caption         =   "Properties"
  622.       End
  623.    End
  624. Attribute VB_Name = "frmMain"
  625. Attribute VB_GlobalNameSpace = False
  626. Attribute VB_Creatable = False
  627. Attribute VB_PredeclaredId = True
  628. Attribute VB_Exposed = False
  629. Const NAME_COLUMN = 0
  630. Const TYPE_COLUMN = 1
  631. Const SIZE_COLUMN = 2
  632. Const DATE_COLUMN = 3
  633. Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
  634. Public PrimeNod, Iexplorer, ctrlPanel, NetNeigh As Node, BeforLab As String
  635. Dim mbMoving As Boolean
  636. Const sglSplitLimit = 500
  637. Private Sub Dir1_Change()
  638.     File1.path = Dir1.path
  639. End Sub
  640. Private Sub Drive1_Change()
  641.     Dir1.path = Drive1.Drive
  642. End Sub
  643. Private Sub Form_Load()
  644.     Timer1.Enabled = True
  645.     Timer1.Interval = 1000
  646.     Dim DeskTopNod, PrimeNod, Iexplorer As Node
  647.     Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
  648.     Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
  649.     Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
  650.     Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
  651.     Set DeskTopNod = tvTreeView.Nodes.Add(, , "DESKTOP", "DESKTOP")
  652.     DeskTopNod.image = ExtractIcoForDrives("c:\windows\explorer.exe", 3)
  653.     DeskTopNod.Expanded = True
  654.     BuildMyComputer ("DESKTOP")
  655.     File1.path = "c:\"
  656.     BuildFileList
  657.     BuildDriveNod ("MyComputer")
  658.     lblTitle(1).Caption = "List View: " + Str(lvListView.ListItems.Count) + " Items"
  659. End Sub
  660. Private Sub lvListView_AfterLabelEdit(Cancel As Integer, NewString As String)
  661.     Dim result As Integer
  662.     result = renameFile(BeforLab, NewString)
  663.     If result = 1 Then MsgBox "Name change Not Succeded", vbOKOnly
  664. End Sub
  665. Private Sub lvListView_BeforeLabelEdit(Cancel As Integer)
  666.     BeforLab = tvTreeView.SelectedItem + "\" + lvListView.SelectedItem
  667. End Sub
  668. Private Sub lvListView_Click()
  669.     lvListView.SetFocus
  670. End Sub
  671. Private Sub lvListView_DblClick()
  672.     open_file (lvListView.SelectedItem.key)
  673. End Sub
  674. Private Sub lvListView_ItemClick(ByVal Item As MSComctlLib.ListItem)
  675. End Sub
  676. Private Sub lvListView_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  677.     If Button = 1 Then
  678.         frmMain.PopupMenu mnuFilePopUp
  679.     End If
  680. End Sub
  681. Private Sub lvListView_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  682.      Select Case Button
  683.    Case 1
  684.        lvListView.Drag vbCancel
  685.         
  686.     Case 2
  687.        ''lvListView.ListItems.Item(lvListView.SelectedItem.Icon).Ghosted = True
  688.        lvListView.DragIcon = ImageList1.ListImages(lvListView.SelectedItem.Icon).ExtractIcon
  689.         
  690.        
  691.         lvListView.DragMode = vbManual
  692.         lvListView.Drag vbBeginDrag
  693.     End Select
  694. End Sub
  695. Private Sub mnuFind_Click()
  696. '    showSearch tvTreeView.SelectedItem.key, tvTreeView.SelectedItem.FullPath, tvTreeView.SelectedItem.image
  697. End Sub
  698. Private Sub mnuPopProperties_Click()
  699.     ShowFileInfo lvListView.SelectedItem.key, ImageList1.ListImages(lvListView.SelectedItem.Icon).ExtractIcon
  700. End Sub
  701. Private Sub mnuToolsOptions_Click()
  702. '    frmOptions.Show
  703. End Sub
  704. Private Sub mnuViewWebBrowser_Click()
  705. Dim explorerpath, retval
  706.         lvListView.ListItems.Clear
  707.         explorerpath = GetExplorer
  708.         retval = Shell(explorerpath, vbMaximizedFocus)
  709. End Sub
  710. Private Sub Timer1_Timer()
  711.     sbStatusBar.Panels(3).text = Time$
  712. End Sub
  713. Private Sub tvTreeView_Click()
  714.     lblTitle(0).Caption = "Current path :" & tvTreeView.SelectedItem
  715. End Sub
  716. Private Sub tvTreeView_Collapse(ByVal Node As MSComctlLib.Node)
  717.      Dim i, j As Long
  718.    Dim n, b, v As Node
  719.    Set b = Node.Child
  720.    For i = 0 To Node.Children - 1
  721.    If b.Children > 0 Then
  722.    b.Expanded = False
  723.    Set n = b.Child
  724.    For j = 0 To b.Children - 1
  725.    Set v = n.Next
  726.     tvTreeView.Nodes.Remove n.Index
  727.     Set n = v
  728.     Next j
  729.     End If
  730.      
  731.      Set b = b.Next
  732.     Next i
  733. End Sub
  734. Private Sub tvTreeView_DblClick()
  735.     Dim temp
  736.     Dim result
  737.     Select Case tvTreeView.Nodes.Item(tvTreeView.SelectedItem.key).Tag
  738.     Case "ControlPanel"
  739.         lvListView.ListItems.Clear
  740.         temp = Shell("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL", vbNormalFocus)
  741.     Case "NetworkNeightborhood"
  742.     Case "InternetExplorer"
  743.         lvListView.ListItems.Clear
  744.         result = GetExplorer
  745.         temp = Shell(result, vbMaximizedFocus)
  746.     End Select
  747. End Sub
  748. Private Sub tvTreeView_DragDrop(Source As Control, x As Single, y As Single)
  749.     Dim nodZ As Node
  750.     Dim FileSource As ListItem
  751.     Dim FileNameSrc, NodDest, a, b As String
  752.     If TypeOf Source Is ListView Then
  753.         Set FileSource = Source.SelectedItem
  754.         Set nodZ = tvTreeView.HitTest(x, y)
  755.         If nodZ <> "DESKTOP" And nodZ <> "Internet Explorer" _
  756.         And nodZ <> "Control Panel" And nodZ <> "Network Neighborhood" _
  757.          And nodZ <> "My computer" Then
  758.             NodDest = nodZ.key + "\" + FileSource
  759.             FileNameSrc = FileSource.key
  760.             FileCopy FileNameSrc, NodDest
  761.         Else
  762.             MsgBox "Invalid Destenation", vbOKOnly, Error
  763.         End If
  764.     End If
  765. End Sub
  766. Private Sub tvTreeView_DragOver(Source As Control, x As Single, y As Single, State As Integer)
  767.     If TypeOf Source Is ListView Then
  768.     Select Case State
  769.         Case vbEnter
  770.             tvTreeView.SetFocus
  771.         Case vbLeave
  772.             lvListView.SetFocus
  773.         Case vbOver
  774.            tvTreeView.DropHighlight = tvTreeView.HitTest(x, y)
  775.     End Select
  776.     End If
  777. End Sub
  778. Private Sub Form_Paint()
  779.     lvListView.View = Val(GetSetting(App.Title, "Settings", "ViewMode", "0"))
  780.     tbToolBar.Buttons(lvListView.View + LISTVIEW_BUTTON).value = tbrPressed
  781.     mnuListViewMode(lvListView.View).Checked = True
  782.     tvTreeView.SetFocus
  783. End Sub
  784. Private Sub Form_Unload(Cancel As Integer)
  785.     Dim i As Integer
  786.     'close all sub forms
  787.     For i = Forms.Count - 1 To 1 Step -1
  788.         Unload Forms(i)
  789.     Next
  790.     If Me.WindowState <> vbMinimized Then
  791.         SaveSetting App.Title, "Settings", "MainLeft", Me.Left
  792.         SaveSetting App.Title, "Settings", "MainTop", Me.Top
  793.         SaveSetting App.Title, "Settings", "MainWidth", Me.Width
  794.         SaveSetting App.Title, "Settings", "MainHeight", Me.Height
  795.     End If
  796.     SaveSetting App.Title, "Settings", "ViewMode", lvListView.View
  797. End Sub
  798. Private Sub mnuHelpAbout_Click()
  799.     'To Do
  800.     MsgBox "About Box Code goes here!"
  801. End Sub
  802. Private Sub mnuViewOptions_Click()
  803.     'To Do
  804.     MsgBox "Options Dialog Code goes here!"
  805. End Sub
  806. Private Sub mnuViewStatusBar_Click()
  807.     If mnuViewStatusBar.Checked Then
  808.         sbStatusBar.Visible = False
  809.         mnuViewStatusBar.Checked = False
  810.     Else
  811.         sbStatusBar.Visible = True
  812.         mnuViewStatusBar.Checked = True
  813.     End If
  814.     SizeControls imgSplitter.Left
  815. End Sub
  816. Private Sub mnuViewToolbar_Click()
  817.     If mnuViewToolbar.Checked Then
  818.         tbToolBar.Visible = False
  819.         mnuViewToolbar.Checked = False
  820.     Else
  821.         tbToolBar.Visible = True
  822.         mnuViewToolbar.Checked = True
  823.     End If
  824.     SizeControls imgSplitter.Left
  825. End Sub
  826. Private Sub Form_Resize()
  827.     On Error Resume Next
  828.     If Me.Width < 3000 Then Me.Width = 3000
  829.     SizeControls imgSplitter.Left
  830. End Sub
  831. Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  832.     With imgSplitter
  833.         picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20
  834.     End With
  835.     picSplitter.Visible = True
  836.     mbMoving = True
  837. End Sub
  838. Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  839.     Dim sglPos As Single
  840.     If mbMoving Then
  841.         sglPos = x + imgSplitter.Left
  842.         If sglPos < sglSplitLimit Then
  843.             picSplitter.Left = sglSplitLimit
  844.         ElseIf sglPos > Me.Width - sglSplitLimit Then
  845.             picSplitter.Left = Me.Width - sglSplitLimit
  846.         Else
  847.             picSplitter.Left = sglPos
  848.         End If
  849.     End If
  850. End Sub
  851. Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  852.     SizeControls picSplitter.Left
  853.     picSplitter.Visible = False
  854.     mbMoving = False
  855. End Sub
  856. Sub SizeControls(x As Single)
  857.     On Error Resume Next
  858.     'set the width
  859.     If x < 1500 Then x = 1500
  860.     If x > (Me.Width - 1500) Then x = Me.Width - 1500
  861.     tvTreeView.Width = x
  862.     imgSplitter.Left = x
  863.     lvListView.Left = x + 40
  864.     lvListView.Width = Me.Width - (tvTreeView.Width + 140)
  865.     lblTitle(0).Width = tvTreeView.Width
  866.     lblTitle(1).Left = lvListView.Left + 20
  867.     lblTitle(1).Width = lvListView.Width - 40
  868.     'set the top
  869.     If tbToolBar.Visible Then
  870.         tvTreeView.Top = tbToolBar.Height + picTitles.Height
  871.     Else
  872.         tvTreeView.Top = picTitles.Height
  873.     End If
  874.     lvListView.Top = tvTreeView.Top
  875.     'set the height
  876.     If sbStatusBar.Visible Then
  877.         tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height + sbStatusBar.Height)
  878.     Else
  879.         tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height)
  880.     End If
  881.     lvListView.Height = tvTreeView.Height
  882.     imgSplitter.Top = tvTreeView.Top
  883.     imgSplitter.Height = tvTreeView.Height
  884. End Sub
  885. Private Sub TreeView1_DragDrop(Source As Control, x As Single, y As Single)
  886.     If Source = imgSplitter Then
  887.         SizeControls x
  888.     End If
  889. End Sub
  890. Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
  891.     Select Case Button.key
  892.         Case "Back"
  893.             'To Do
  894.             MsgBox "Back Code goes here!"
  895.         Case "Forward"
  896.             'To Do
  897.             MsgBox "Forward Code goes here!"
  898.         Case "Cut"
  899.             mnuEditCut_Click
  900.         Case "Copy"
  901.             mnuEditCopy_Click
  902.         Case "Paste"
  903.             mnuEditPaste_Click
  904.         Case "Delete"
  905.             mnuFileDelete_Click
  906.         Case "Properties"
  907.             mnuFileProperties_Click
  908.         Case "View Large icons"
  909.             mnuListViewMode_Click lvwIcon
  910.         Case "View Small icons"
  911.             mnuListViewMode_Click lvwSmallIcon
  912.         Case "View List"
  913.             mnuListViewMode_Click lvwList
  914.         Case "View Details"
  915.             mnuListViewMode_Click lvwReport
  916.         Case "Find"
  917.             mnuFind_Click
  918.     End Select
  919. End Sub
  920. Private Sub mnuHelpContents_Click()
  921.     Dim nRet As Integer
  922.     'if there is no helpfile for this project display a message to the user
  923.     'you can set the HelpFile for your application in the
  924.     'Project Properties dialog
  925.     If Len(App.HelpFile) = 0 Then
  926.         MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
  927.     Else
  928.         On Error Resume Next
  929.         nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0)
  930.         If Err Then
  931.             MsgBox Err.Description
  932.         End If
  933.     End If
  934. End Sub
  935. Private Sub mnuHelpSearch_Click()
  936.     Dim nRet As Integer
  937.     'if there is no helpfile for this project display a message to the user
  938.     'you can set the HelpFile for your application in the
  939.     'Project Properties dialog
  940.     If Len(App.HelpFile) = 0 Then
  941.         MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
  942.     Else
  943.         On Error Resume Next
  944.         nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0)
  945.         If Err Then
  946.             MsgBox Err.Description
  947.         End If
  948.     End If
  949. End Sub
  950. Private Sub mnuVAIByDate_Click()
  951.     'To Do
  952. '  lvListView.SortKey = DATE_COLUMN
  953. End Sub
  954. Private Sub mnuVAIByName_Click()
  955.     'To Do
  956. '  lvListView.SortKey = NAME_COLUMN
  957. End Sub
  958. Private Sub mnuVAIBySize_Click()
  959.     'To Do
  960. '  lvListView.SortKey = SIZE_COLUMN
  961. End Sub
  962. Private Sub mnuVAIByType_Click()
  963.     'To Do
  964. '  lvListView.SortKey = TYPE_COLUMN
  965. End Sub
  966. Private Sub mnuListViewMode_Click(Index As Integer)
  967.     'uncheck the current type
  968.     mnuListViewMode(lvListView.View).Checked = False
  969.     'set the listview mode
  970.     lvListView.View = Index
  971.     'check the new type
  972.     mnuListViewMode(Index).Checked = True
  973.     'set the toolabr to the same new type
  974.     tbToolBar.Buttons(Index + LISTVIEW_BUTTON).value = tbrPressed
  975. End Sub
  976. Private Sub mnuViewLineUpIcons_Click()
  977.     'To Do
  978.     lvListView.Arrange = lvwAutoLeft
  979. End Sub
  980. Private Sub mnuViewRefresh_Click()
  981.     'To Do
  982.     MsgBox "Refresh Code goes here!"
  983. End Sub
  984. Private Sub mnuEditCopy_Click()
  985.     'To Do
  986.     MsgBox "Copy Code goes here!"
  987. End Sub
  988. Private Sub mnuEditCut_Click()
  989.     'To Do
  990.     MsgBox "Cut Code goes here!"
  991. End Sub
  992. Private Sub mnuEditDSelectAll_Click()
  993.     'To Do
  994.     MsgBox "Select All Code goes here!"
  995. End Sub
  996. Private Sub mnuEditInvertSelection_Click()
  997.     'To Do
  998.     MsgBox "Invert Selection Code goes here!"
  999. End Sub
  1000. Private Sub mnuEditPaste_Click()
  1001.     'To Do
  1002.     MsgBox "Paste Code goes here!"
  1003. End Sub
  1004. Private Sub mnuEditPasteSpecial_Click()
  1005.     'To Do
  1006.     MsgBox "Paste Special Code goes here!"
  1007. End Sub
  1008. Private Sub mnuEditUndo_Click()
  1009.     'To Do
  1010.     MsgBox "Undo Code goes here!"
  1011. End Sub
  1012. Private Sub mnuFileOpen_Click()
  1013.    response = MsgBox("Open " + Left(lvListView.SelectedItem, 4) + " program", vbYesNoCancel)
  1014.    If response Then
  1015.     open_file (lvListView.SelectedItem.key)
  1016.     End If
  1017. End Sub
  1018. Private Sub mnuFileFind_Click()
  1019.     'To Do
  1020.     MsgBox "Find Code goes here!"
  1021. End Sub
  1022. Private Sub mnuFileSendTo_Click()
  1023.     'To Do
  1024.     MsgBox "Send To Code goes here!"
  1025. End Sub
  1026. Private Sub mnuFileNew_Click()
  1027.     'To Do
  1028.     MsgBox "New File Code goes here!"
  1029. End Sub
  1030. Private Sub mnuFileDelete_Click()
  1031.     response = MsgBox("Delete " + tvTreeView.SelectedItem + "\" + lvListView.SelectedItem, vbYesNoCancel)
  1032.    If response = vbYes Then
  1033.     Kill (lvListView.SelectedItem.key)
  1034.     lvListView.ListItems.Remove (lvListView.SelectedItem.Index)
  1035.     lvListView.Refresh
  1036.     End If
  1037. End Sub
  1038. Private Sub mnuFileRename_Click()
  1039.     lvListView.StartLabelEdit
  1040. End Sub
  1041. Private Sub mnuFileProperties_Click()
  1042.     ShowFileInfo lvListView.SelectedItem.key, ImageList1.ListImages(lvListView.SelectedItem.Icon).ExtractIcon
  1043. End Sub
  1044. Private Sub mnuFileMRU_Click(Index As Integer)
  1045.     'To Do
  1046.     MsgBox "MRU Code goes here!"
  1047. End Sub
  1048. Private Sub mnuFileClose_Click()
  1049.     'unload the form
  1050.     Unload Me
  1051. End Sub
  1052. Public Function extractico(ByVal appname As String, ByVal numIcon As Long) As Integer
  1053.     Dim MyInst, i As Long
  1054.     Dim img As ListImage
  1055.     Dim nIcon, hIcon, draw, isdraw As Long
  1056.     If ImageList1.ListImages.Count >= 1 Then
  1057.         For i = 1 To ImageList1.ListImages.Count
  1058.             If ImageList1.ListImages(i).key = appname + Str(numIcon) Then
  1059.                 extractico = i
  1060.                 Exit Function
  1061.             End If
  1062.         Next i
  1063.     End If
  1064.     MyInst = GetModuleHandle(appname)
  1065.     Picture1.Picture = LoadPicture("")
  1066.     hIcon = ExtractIcon(MyInst, appname, numIcon)
  1067.     nIcon = LoadIcon(MyInst, hIcon)
  1068.     Picture1.AutoRedraw = True
  1069.     draw = DrawIcon(Picture1.hdc, Picture1.CurrentX, Picture1.CurrentY, hIcon)
  1070.     If draw = 1 Then
  1071.     Picture1.Refresh
  1072.     Set img = ImageList1.ListImages.Add(ImageList1.ListImages.Count + 1, appname + Str(numIcon), Picture1.image)
  1073.     extractico = ImageList1.ListImages.Count
  1074.     Else
  1075.         extractico = -1
  1076.     End If
  1077. End Function
  1078. Public Function ExtractSmallIco(ByVal appname As String, ByVal numIcon As Integer) As Long
  1079.     Dim MyInst, i As Long
  1080.     Dim img As ListImage
  1081.     Dim nIcon, hIcon, draw, isdraw As Long
  1082.     If ImageList2.ListImages.Count > 1 Then
  1083.         For i = 1 To ImageList2.ListImages.Count
  1084.             If ImageList2.ListImages(i).key = appname + Str(numIcon) Then
  1085.                 ExtractSmallIco = i
  1086.                 Exit Function
  1087.             End If
  1088.         Next i
  1089.     End If
  1090.     MyInst = GetModuleHandle(appname)
  1091.     Picture2.Picture = LoadPicture("")
  1092.     hIcon = ExtractIcon(MyInst, appname, numIcon)
  1093.     nIcon = LoadIcon(MyInst, hIcon)
  1094.     Picture2.AutoRedraw = True
  1095.     draw = DrawIcon(Picture2.hdc, Picture2.CurrentX, Picture2.CurrentY, hIcon)
  1096.     If draw = 1 Then
  1097.         Picture1.Refresh
  1098.         Set img = ImageList2.ListImages.Add(ImageList2.ListImages.Count + 1, appname + Str(numIcon), Picture2.image)
  1099.         ExtractSmallIco = ImageList2.ListImages.Count
  1100.     Else
  1101.         ExtractSmallIco = 1
  1102.     End If
  1103. End Function
  1104. Public Function ExtractIcoForDrives(appname As String, numIcon As Integer) As Long
  1105.     ''ExtractIcoForDrives = 1
  1106.     ''Exit Function
  1107.     Dim MyInst, i As Long
  1108.     Dim img As ListImage
  1109.     Dim nIcon, hIcon, draw, isdraw As Long
  1110.     If ImageList3.ListImages.Count > 1 Then
  1111.     For i = 1 To ImageList3.ListImages.Count
  1112.         If ImageList3.ListImages(i).key = appname + Str(numIcon) Then
  1113.         ExtractIcoForDrives = i
  1114.         Exit Function
  1115.     End If
  1116.     Next i
  1117.     End If
  1118.     MyInst = GetModuleHandle(appname)
  1119.     Picture3.Picture = LoadPicture("")
  1120.     hIcon = ExtractIcon(MyInst, appname, numIcon)
  1121.     nIcon = LoadIcon(MyInst, hIcon)
  1122.     Picture3.AutoRedraw = True
  1123.     draw = DrawIcon(Picture3.hdc, Picture3.CurrentX, Picture3.CurrentY, hIcon)
  1124.     If draw = 1 Then
  1125.     Picture1.Refresh
  1126.     Set img = ImageList3.ListImages.Add(ImageList3.ListImages.Count + 1, appname + Str(numIcon), Picture3.image)
  1127.     ExtractIcoForDrives = ImageList3.ListImages.Count
  1128.     Else
  1129.         ExtractIcoForDrives = 1
  1130.     End If
  1131. End Function
  1132. Public Function BuildDriveNod(Key1 As String)
  1133.     Dim FileName, DriveType, text As String
  1134.     Dim i, j, z, x, e As Integer
  1135.     Dim fs, d, s
  1136.     Dim pat, drlst, drvlst, flst, len1 As String
  1137.     Dim PrimeNod, nod, nod1, nod3 As Node
  1138.     Dim fil1 As ListItem
  1139.      On Error GoTo Error1
  1140.         For e = 0 To Drive1.ListCount - 1
  1141.         len1 = Trim(Left(Drive1.List(e), 3))
  1142.         DriveType = GetDriveType(Left(Drive1.List(e), 2) + "\")
  1143.         text = Drive1.List(e)
  1144.         Set nod3 = tvTreeView.Nodes.Add(Key1, tvwChild, len1, text)
  1145.             Select Case DriveType
  1146.                 Case 0
  1147.                     nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 12)
  1148.                 Case 1
  1149.                     nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 12)
  1150.                 Case 2
  1151.                     nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 6)
  1152.                 Case 3
  1153.                     nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 8)
  1154.                 Case 4
  1155.                     nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 9)
  1156.                 Case 5
  1157.                     nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 11)
  1158.             End Select
  1159.         ''Dir1.Path = len1 + "\"
  1160.         BuildDirNode (len1)
  1161.         Next e
  1162.             Exit Function
  1163. Error1:
  1164. Resume n
  1165. MsgBox Err.Description
  1166. End Function
  1167. Public Function BuildDirNode(Key1 As String)
  1168.     Dim i, j, z, x, e As Integer
  1169.     Dim pat, drlst, drvlst, flst, len1, temp, midtest As String
  1170.     Dim PrimeNod, nod, nod1, nod3 As Node
  1171.     pat = Dir1.path
  1172.     If Right(Key1, 1) <> "\" Then
  1173.                Dir1.path = Key1 + "\"
  1174.     Else
  1175.         Dir1.path = Key1 '' + "\"
  1176.     ''pat = Dir1.Path
  1177.     End If
  1178.     For i = 0 To Dir1.ListCount - 1
  1179.         If Mid(Dir1.List(i), 5, 1) <> "\" Then
  1180.             midtest = Dir1.List(i)
  1181.         Else
  1182.             midtest = Trim(Mid(Dir1.List(i), 1, 4)) + Trim(Mid(Dir1.List(i), 6, 100))
  1183.         End If
  1184.         temp = Dir1.List(i)
  1185.         Set nod = tvTreeView.Nodes.Add(Key1, tvwChild, midtest, Mid$(Dir1.List(i), 2 + Len(Key1), 100))
  1186.             tvTreeView.Nodes.Item(Dir1.List(i)).Tag = "dir"
  1187.             nod.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 3)
  1188.        Next i
  1189.     Dir1.path = pat
  1190. End Function
  1191. Public Function BuildFileList()
  1192.     Dim IconFileName, FileName, resultQryReg, dirpath As String
  1193.     Dim z, iconum As Integer
  1194.     Dim IconFileNum As Long
  1195.     Dim pat, drlst, drvlst, flst As String
  1196.     Dim fil1 As ListItem
  1197.     Dim fs, f, s
  1198.     Set fs = CreateObject("Scripting.FileSystemObject")
  1199.      For z = 0 To File1.ListCount - 1
  1200.             flst = File1.List(z)
  1201.             If Right(File1.path, 1) <> "\" Then
  1202.                 dirpath = File1.path + "\"
  1203.             Else
  1204.                 dirpath = File1.path
  1205.             End If
  1206.             Set f = fs.GetFile(dirpath + File1.List(z))
  1207.             Set fil1 = lvListView.ListItems.Add(, dirpath + File1.List(z), File1.List(z))
  1208.                 fil1.SubItems(1) = dirpath
  1209.                 fil1.SubItems(2) = f.Size
  1210.                 fil1.SubItems(3) = f.Type
  1211.                 ''lvListView.ListItems.Item(File1.List(z)).Tag = "File"
  1212.             resultQryReg = qryReg(Right(File1.List(z), 4))
  1213.             If Trim(resultQryReg) = "" Then
  1214.                 resultQryReg = "c:\windows\system\shell32.dLl,0"
  1215.             ElseIf Mid(resultQryReg, 1, 1) = "%" Then
  1216.                 resultQryReg = dirpath + File1.List(z) + "," + Str(CInt(Mid(resultQryReg, 2, 2) - 1))
  1217.             End If
  1218.             IconFileName = Mid(resultQryReg, 1, InStr(1, resultQryReg, ",", vbTextCompare) - 1)
  1219.             IconFileNum = (Mid(resultQryReg, InStr(1, resultQryReg, ",", vbTextCompare) + 1, 5))
  1220.             iconum = extractico(IconFileName, IconFileNum)
  1221.             If iconum = -1 Then
  1222.             Select Case Right(File1.List(z), 3)
  1223.             Case "EXE"
  1224.                 fil1.Icon = extractico("c:\windows\system\shell32.dll", 2)
  1225.                 ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 2)
  1226.             Case Else
  1227.                 fil1.Icon = extractico("c:\windows\system\shell32.dll", 0)
  1228.                 ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 0)
  1229.             End Select
  1230.             Else
  1231.             fil1.Icon = iconum
  1232.             ''fil1.SmallIcon = iconum
  1233.             End If
  1234.     Next z
  1235. End Function
  1236. Public Function BuildMyComputer(Key1 As String)
  1237.     Dim explorerpath As String
  1238.     Set PrimeNod = tvTreeView.Nodes.Add(Key1, tvwChild, "MyComputer", "My Comupter")
  1239.     PrimeNod.Expanded = True
  1240.     PrimeNod.image = ExtractIcoForDrives("c:\windows\explorer.exe", 0)
  1241.     ''tvTreeView.Nodes.Item(Dir1.List(i)).Tag = "dir"
  1242.     Set ctrlPanel = tvTreeView.Nodes.Add(Key1, tvwChild, "ControlPanel", "Control Panel")
  1243.     ctrlPanel.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 35)
  1244.     tvTreeView.Nodes.Item(ctrlPanel.key).Tag = "ControlPanel"
  1245.     Set Iexplorer = tvTreeView.Nodes.Add(Key1, tvwChild, "IEXPLORER", "Internet Explorer")
  1246.     explorerpath = GetExplorer
  1247.     explorerpath = Mid(explorerpath, 2, 33)
  1248.     Iexplorer.image = ExtractIcoForDrives(Trim(explorerpath), 0)
  1249.     tvTreeView.Nodes.Item(Iexplorer.key).Tag = "InternetExplorer"
  1250.     Set NetNeigh = tvTreeView.Nodes.Add(Key1, tvwChild, "NetworkNeighborhood", "Network Neighborhood")
  1251.     NetNeigh.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 17)
  1252.     ''tvTreeView.Nodes.Item(NetNiegh.key).Tag = "NetworkNeightborhood"
  1253. End Function
  1254. Private Sub tvTreeView_Expand(ByVal Node As MSComctlLib.Node)
  1255.       Dim i, j As Integer
  1256.     Dim pat, drlst As String
  1257.     Dim nod, nod1 As Node
  1258.     Dim key As Long
  1259.     On Err GoTo error2
  1260.     If Node.key = "DESKTOP" Then
  1261.             BuildDriveNod ("MyComputer")
  1262.     ElseIf Node.key = "MyComputer" Then
  1263.         BuildDriveNod (Drive1.List(j))
  1264.     Else
  1265.         Screen.MousePointer = 11
  1266.        ''tvTreeView.Nodes.Remove (Node.key)
  1267.        Dir1.path = Node.key + "\"
  1268.        For i = 0 To Dir1.ListCount - 1
  1269.        If Mid(Dir1.List(i), 5, 1) <> "\" Then
  1270.             midtest = Dir1.List(i)
  1271.         Else
  1272.             midtest = Trim(Mid(Dir1.List(i), 1, 4)) + Trim(Mid(Dir1.List(i), 6, 100))
  1273.         End If
  1274.         BuildDirNode (midtest)
  1275.        Next i
  1276.     End If
  1277.     Screen.MousePointer = 0
  1278. Exit Sub
  1279. error2:
  1280.     Resume i
  1281. End Sub
  1282. Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node)
  1283.     Dim fil1 As ListItem
  1284.     Dim i, z, iconum As Integer
  1285.     Dim IconFileNum, retval As Long
  1286.     Dim path, explorerpath As String
  1287.     Dim flst, resultQryReg, IconFileName, dirpath As String
  1288.     Dim fs, f, s, d
  1289.     'On Error GoTo eh
  1290.     Set fs = CreateObject("Scripting.FileSystemObject")
  1291.     For i = 0 To Drive1.ListCount - 1
  1292.     If Node.text = Drive1.List(i) Then
  1293.     Set d = fs.GetDrive(Drive1.List(i))
  1294.     If d.isready Then
  1295.         path = Drive1.List(i) + "\"
  1296.         File1.path = path
  1297.         is_equal = True
  1298.         sbStatusBar.Panels(1).text = "Free Space: " & FormatNumber(d.FreeSpace / 1024, 0) & "MB"
  1299.     End If
  1300.     Exit For
  1301.     End If
  1302.     Next i
  1303.     Select Case Node.key
  1304.     Case "DESKTOP"
  1305.         File1.path = "c:\windows\desktop"
  1306.     Case "IEXPLORER"
  1307.         lvListView.ListItems.Clear
  1308.         explorerpath = GetExplorer
  1309.         retval = Shell(explorerpath, vbMaximizedFocus)
  1310.     Case "ControlPanel"
  1311.         lvListView.ListItems.Clear
  1312.         retval = Shell("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL", vbMaximizedFocus)
  1313.     Case "NetworkNeighborhood"
  1314.         MsgBox "Not Available Yet", vbOKOnly, "setup"
  1315.     Case "MyComputer"
  1316.     Case Else
  1317.         'File1.path = Node.key
  1318.     lvListView.ListItems.Clear
  1319.     ''lvListView.View = lvwIcon
  1320.     For z = 0 To File1.ListCount - 1
  1321.         flst = File1.List(z)
  1322.         If Right(File1.path, 1) <> "\" Then
  1323.                 dirpath = File1.path + "\"
  1324.         Else
  1325.             dirpath = File1.path
  1326.         End If
  1327.         Set f = fs.GetFile(dirpath + File1.List(z))
  1328.         Set fil1 = lvListView.ListItems.Add(, dirpath + File1.List(z), File1.List(z))
  1329.         fil1.SubItems(1) = dirpath
  1330.         fil1.SubItems(2) = f.Size
  1331.         fil1.SubItems(3) = f.Type
  1332.         ''lvListView.ListItems(File1.List(z)).Tag = "File"
  1333.         resultQryReg = qryReg(Right(File1.List(z), 4))
  1334.             If Trim(resultQryReg) = "" Then
  1335.                 resultQryReg = "c:\windows\system\shell32.dll,0"
  1336.             ElseIf Mid(resultQryReg, 1, 1) = "%" Then
  1337.                 resultQryReg = dirpath + File1.List(z) + "," + Str(CInt(Mid(resultQryReg, 2, 2) - 1))
  1338.             
  1339.             End If
  1340.             If InStr(1, resultQryReg, ",", vbTextCompare) = 0 Then
  1341.             resultQryReg = resultQryReg + ",0"
  1342.             End If
  1343.             IconFileName = Mid(resultQryReg, 1, InStr(1, resultQryReg, ",", vbTextCompare) - 1)
  1344.             IconFileNum = (Mid(resultQryReg, InStr(1, resultQryReg, ",", vbTextCompare) + 1, 5))
  1345.             iconum = extractico(IconFileName, IconFileNum)
  1346.             If iconum = -1 Then
  1347.             Select Case Right(File1.List(z), 3)
  1348.             Case "EXE"
  1349.                 fil1.Icon = extractico("c:\windows\system\shell32.dll", 2)
  1350.                 ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 2)
  1351.             Case Else
  1352.                 fil1.Icon = extractico("c:\windows\system\shell32.dll", 0)
  1353.                 ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 0)
  1354.             End Select
  1355.             Else
  1356.             fil1.Icon = iconum
  1357.            ''fil1.SmallIcon = iconum
  1358.             End If
  1359.     Next z
  1360.     lblTitle(1).Caption = "List View: " + Str(lvListView.ListItems.Count) + " Items"
  1361.     End Select
  1362. 'MsgBox "Device Not Ready", vbOKOnly
  1363. 'Resume Next
  1364. End Sub
  1365.