Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Cappa System - Form1.vb

Form1.vb

Caricato da: VB.NET_Program_91
Scarica il programma completo

  1. Option Explicit On
  2. Imports System.IO
  3. Imports System.Threading
  4. Imports Audio
  5. Public Class Form1
  6.     Inherits System.Windows.Forms.Form
  7.  
  8. #Region " Windows Form Designer generated code "
  9.  
  10.     Public Sub New()
  11.         MyBase.New()
  12.  
  13.         'This call is required by the Windows Form Designer.
  14.         InitializeComponent()
  15.  
  16.         'Add any initialization after the InitializeComponent() call
  17.  
  18.     End Sub
  19.  
  20.     'Form overrides dispose to clean up the component list.
  21.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  22.         If disposing Then
  23.             If Not (components Is Nothing) Then
  24.                 components.Dispose()
  25.             End If
  26.         End If
  27.         MyBase.Dispose(disposing)
  28.     End Sub
  29.  
  30.     'Required by the Windows Form Designer
  31.     Private components As System.ComponentModel.IContainer
  32.  
  33.     'NOTE: The following procedure is required by the Windows Form Designer
  34.     'It can be modified using the Windows Form Designer.  
  35.     'Do not modify it using the code editor.
  36.     Friend WithEvents PanelTop1 As System.Windows.Forms.Panel
  37.     Friend WithEvents PanelBottom1 As System.Windows.Forms.Panel
  38.     Friend WithEvents BlendPanelLeft1 As CappaSystem.BlendPanel
  39.     Friend WithEvents PanelFiller1 As System.Windows.Forms.Panel
  40.     Friend WithEvents PanelL1 As System.Windows.Forms.Panel
  41.     Friend WithEvents PanelL2 As System.Windows.Forms.Panel
  42.     Friend WithEvents PanelT1 As System.Windows.Forms.Panel
  43.     Friend WithEvents TaskControl1 As CappaSystem.TaskControl
  44.     Friend WithEvents PanelT2 As System.Windows.Forms.Panel
  45.     Friend WithEvents TaskControl2 As CappaSystem.TaskControl
  46.     Friend WithEvents BlendPanel2 As CappaSystem.BlendPanel
  47.     Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
  48.     Public WithEvents ilMain As System.Windows.Forms.ImageList
  49.     Friend WithEvents cm1 As System.Windows.Forms.ContextMenu
  50.     Public WithEvents ilSmall As System.Windows.Forms.ImageList
  51.     Friend WithEvents tmTimer As System.Timers.Timer
  52.     Public WithEvents sbStatusBar As System.Windows.Forms.StatusBar
  53.     Friend WithEvents StatusBarPanel1 As System.Windows.Forms.StatusBarPanel
  54.     Friend WithEvents StatusBarPanel2 As System.Windows.Forms.StatusBarPanel
  55.     Friend WithEvents StatusBarPanel3 As System.Windows.Forms.StatusBarPanel
  56.     Friend WithEvents Label1 As System.Windows.Forms.Label
  57.     Friend WithEvents lblpath As System.Windows.Forms.TextBox
  58.     Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
  59.     Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
  60.     Friend WithEvents Button2 As System.Windows.Forms.Button
  61.     Friend WithEvents LinkLabel1 As System.Windows.Forms.LinkLabel
  62.     Friend WithEvents LinkLabel2 As System.Windows.Forms.LinkLabel
  63.     Friend WithEvents Button3 As System.Windows.Forms.Button
  64.     Friend WithEvents Button4 As System.Windows.Forms.Button
  65.     Friend WithEvents Button5 As System.Windows.Forms.Button
  66.     Friend WithEvents Button6 As System.Windows.Forms.Button
  67.     Friend WithEvents Button7 As System.Windows.Forms.Button
  68.     Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
  69.     Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
  70.     Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
  71.     Friend WithEvents PanelTemp1 As System.Windows.Forms.Panel
  72.     Friend WithEvents Text1 As System.Windows.Forms.TextBox
  73.     Friend WithEvents tbtype As System.Windows.Forms.TextBox
  74.     Friend WithEvents tbmodified As System.Windows.Forms.TextBox
  75.     Friend WithEvents tbsize As System.Windows.Forms.TextBox
  76.     Friend WithEvents it As System.Windows.Forms.TextBox
  77.     Friend WithEvents mnufile As System.Windows.Forms.MenuItem
  78.     Friend WithEvents mnuopen As System.Windows.Forms.MenuItem
  79.     Friend WithEvents mnusep1 As System.Windows.Forms.MenuItem
  80.     Friend WithEvents mnuexit As System.Windows.Forms.MenuItem
  81.     Friend WithEvents mnuhelp As System.Windows.Forms.MenuItem
  82.     Friend WithEvents mnuabout As System.Windows.Forms.MenuItem
  83.     Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
  84.     Friend WithEvents OpenFileDialog2 As System.Windows.Forms.OpenFileDialog
  85.     Friend WithEvents Label3 As System.Windows.Forms.Label
  86.     Friend WithEvents TaskControl3 As CappaSystem.TaskControl
  87.     Friend WithEvents adfilename As System.Windows.Forms.Label
  88.     Friend WithEvents adfiletype As System.Windows.Forms.Label
  89.     Friend WithEvents adfilesize As System.Windows.Forms.Label
  90.     Friend WithEvents img1 As System.Windows.Forms.PictureBox
  91.     Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
  92.     Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
  93.     Public WithEvents lvListView As System.Windows.Forms.ListView
  94.     Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
  95.     Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader
  96.     Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader
  97.     Friend WithEvents ColumnHeader4 As System.Windows.Forms.ColumnHeader
  98.     Friend WithEvents spSplitter As System.Windows.Forms.Splitter
  99.     Public WithEvents tvTreeView As System.Windows.Forms.TreeView
  100.     Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
  101.     Friend WithEvents listaProcessi As System.Windows.Forms.ListView
  102.     Friend WithEvents colProcesso As System.Windows.Forms.ColumnHeader
  103.     Friend WithEvents colTitolo As System.Windows.Forms.ColumnHeader
  104.     Friend WithEvents colUtente As System.Windows.Forms.ColumnHeader
  105.     Friend WithEvents colID As System.Windows.Forms.ColumnHeader
  106.     Friend WithEvents colPriorità As System.Windows.Forms.ColumnHeader
  107.     Friend WithEvents colHandle As System.Windows.Forms.ColumnHeader
  108.     Friend WithEvents colThreads As System.Windows.Forms.ColumnHeader
  109.     Friend WithEvents colOraAvvio As System.Windows.Forms.ColumnHeader
  110.     Friend WithEvents TaskControl4 As CappaSystem.TaskControl
  111.     Friend WithEvents name1 As System.Windows.Forms.Label
  112.     Friend WithEvents Label4 As System.Windows.Forms.Label
  113.     Friend WithEvents Label2 As System.Windows.Forms.Label
  114.     Friend WithEvents Label6 As System.Windows.Forms.Label
  115.     Friend WithEvents Button1 As System.Windows.Forms.Button
  116.     Friend WithEvents Button8 As System.Windows.Forms.Button
  117.     Friend WithEvents tbfilename As System.Windows.Forms.TextBox
  118.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  119.         Me.components = New System.ComponentModel.Container
  120.         Dim ListViewItem1 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"1", "1,2", "1,3", "1,4"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)))
  121.         Dim ListViewItem2 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"2"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)))
  122.         Dim ListViewItem3 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"3"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)))
  123.         Dim ListViewItem4 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"4"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)))
  124.         Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
  125.         Me.PanelTop1 = New System.Windows.Forms.Panel
  126.         Me.BlendPanel2 = New CappaSystem.BlendPanel
  127.         Me.Button2 = New System.Windows.Forms.Button
  128.         Me.lblpath = New System.Windows.Forms.TextBox
  129.         Me.Label1 = New System.Windows.Forms.Label
  130.         Me.PanelBottom1 = New System.Windows.Forms.Panel
  131.         Me.sbStatusBar = New System.Windows.Forms.StatusBar
  132.         Me.StatusBarPanel1 = New System.Windows.Forms.StatusBarPanel
  133.         Me.StatusBarPanel2 = New System.Windows.Forms.StatusBarPanel
  134.         Me.StatusBarPanel3 = New System.Windows.Forms.StatusBarPanel
  135.         Me.PanelFiller1 = New System.Windows.Forms.Panel
  136.         Me.TabControl1 = New System.Windows.Forms.TabControl
  137.         Me.TabPage1 = New System.Windows.Forms.TabPage
  138.         Me.lvListView = New System.Windows.Forms.ListView
  139.         Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
  140.         Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
  141.         Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
  142.         Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
  143.         Me.cm1 = New System.Windows.Forms.ContextMenu
  144.         Me.ilMain = New System.Windows.Forms.ImageList(Me.components)
  145.         Me.ilSmall = New System.Windows.Forms.ImageList(Me.components)
  146.         Me.spSplitter = New System.Windows.Forms.Splitter
  147.         Me.tvTreeView = New System.Windows.Forms.TreeView
  148.         Me.TabPage2 = New System.Windows.Forms.TabPage
  149.         Me.listaProcessi = New System.Windows.Forms.ListView
  150.         Me.colProcesso = New System.Windows.Forms.ColumnHeader
  151.         Me.colTitolo = New System.Windows.Forms.ColumnHeader
  152.         Me.colUtente = New System.Windows.Forms.ColumnHeader
  153.         Me.colID = New System.Windows.Forms.ColumnHeader
  154.         Me.colPriorità = New System.Windows.Forms.ColumnHeader
  155.         Me.colHandle = New System.Windows.Forms.ColumnHeader
  156.         Me.colThreads = New System.Windows.Forms.ColumnHeader
  157.         Me.colOraAvvio = New System.Windows.Forms.ColumnHeader
  158.         Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
  159.         Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
  160.         Me.tmTimer = New System.Timers.Timer
  161.         Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
  162.         Me.MainMenu1 = New System.Windows.Forms.MainMenu(Me.components)
  163.         Me.mnufile = New System.Windows.Forms.MenuItem
  164.         Me.mnuopen = New System.Windows.Forms.MenuItem
  165.         Me.mnusep1 = New System.Windows.Forms.MenuItem
  166.         Me.mnuexit = New System.Windows.Forms.MenuItem
  167.         Me.mnuhelp = New System.Windows.Forms.MenuItem
  168.         Me.mnuabout = New System.Windows.Forms.MenuItem
  169.         Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
  170.         Me.OpenFileDialog2 = New System.Windows.Forms.OpenFileDialog
  171.         Me.BlendPanelLeft1 = New CappaSystem.BlendPanel
  172.         Me.TaskControl4 = New CappaSystem.TaskControl
  173.         Me.Label6 = New System.Windows.Forms.Label
  174.         Me.Label4 = New System.Windows.Forms.Label
  175.         Me.Button8 = New System.Windows.Forms.Button
  176.         Me.name1 = New System.Windows.Forms.Label
  177.         Me.Label2 = New System.Windows.Forms.Label
  178.         Me.Button1 = New System.Windows.Forms.Button
  179.         Me.tbfilename = New System.Windows.Forms.TextBox
  180.         Me.TaskControl3 = New CappaSystem.TaskControl
  181.         Me.img1 = New System.Windows.Forms.PictureBox
  182.         Me.adfilesize = New System.Windows.Forms.Label
  183.         Me.adfiletype = New System.Windows.Forms.Label
  184.         Me.adfilename = New System.Windows.Forms.Label
  185.         Me.Label3 = New System.Windows.Forms.Label
  186.         Me.PanelTemp1 = New System.Windows.Forms.Panel
  187.         Me.Text1 = New System.Windows.Forms.TextBox
  188.         Me.tbtype = New System.Windows.Forms.TextBox
  189.         Me.tbmodified = New System.Windows.Forms.TextBox
  190.         Me.tbsize = New System.Windows.Forms.TextBox
  191.         Me.it = New System.Windows.Forms.TextBox
  192.         Me.TaskControl2 = New CappaSystem.TaskControl
  193.         Me.PictureBox2 = New System.Windows.Forms.PictureBox
  194.         Me.PictureBox1 = New System.Windows.Forms.PictureBox
  195.         Me.Button7 = New System.Windows.Forms.Button
  196.         Me.Button6 = New System.Windows.Forms.Button
  197.         Me.Button5 = New System.Windows.Forms.Button
  198.         Me.Button4 = New System.Windows.Forms.Button
  199.         Me.Button3 = New System.Windows.Forms.Button
  200.         Me.PanelT2 = New System.Windows.Forms.Panel
  201.         Me.TaskControl1 = New CappaSystem.TaskControl
  202.         Me.LinkLabel1 = New System.Windows.Forms.LinkLabel
  203.         Me.LinkLabel2 = New System.Windows.Forms.LinkLabel
  204.         Me.PanelT1 = New System.Windows.Forms.Panel
  205.         Me.PanelL2 = New System.Windows.Forms.Panel
  206.         Me.PanelL1 = New System.Windows.Forms.Panel
  207.         Me.PanelTop1.SuspendLayout()
  208.         Me.BlendPanel2.SuspendLayout()
  209.         Me.PanelBottom1.SuspendLayout()
  210.         CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).BeginInit()
  211.         CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).BeginInit()
  212.         CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).BeginInit()
  213.         Me.PanelFiller1.SuspendLayout()
  214.         Me.TabControl1.SuspendLayout()
  215.         Me.TabPage1.SuspendLayout()
  216.         Me.TabPage2.SuspendLayout()
  217.         CType(Me.tmTimer, System.ComponentModel.ISupportInitialize).BeginInit()
  218.         Me.BlendPanelLeft1.SuspendLayout()
  219.         Me.TaskControl4.SuspendLayout()
  220.         Me.TaskControl3.SuspendLayout()
  221.         CType(Me.img1, System.ComponentModel.ISupportInitialize).BeginInit()
  222.         Me.PanelTemp1.SuspendLayout()
  223.         Me.TaskControl2.SuspendLayout()
  224.         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
  225.         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
  226.         Me.TaskControl1.SuspendLayout()
  227.         Me.SuspendLayout()
  228.         '
  229.         'PanelTop1
  230.         '
  231.         Me.PanelTop1.Controls.Add(Me.BlendPanel2)
  232.         Me.PanelTop1.Dock = System.Windows.Forms.DockStyle.Top
  233.         Me.PanelTop1.Location = New System.Drawing.Point(0, 0)
  234.         Me.PanelTop1.Name = "PanelTop1"
  235.         Me.PanelTop1.Size = New System.Drawing.Size(1021, 35)
  236.         Me.PanelTop1.TabIndex = 1
  237.         '
  238.         'BlendPanel2
  239.         '
  240.         Me.BlendPanel2.BlendType = False
  241.         Me.BlendPanel2.ColorEnd = System.Drawing.SystemColors.Control
  242.         Me.BlendPanel2.ColorStart = System.Drawing.SystemColors.ControlLightLight
  243.         Me.BlendPanel2.Controls.Add(Me.Button2)
  244.         Me.BlendPanel2.Controls.Add(Me.lblpath)
  245.         Me.BlendPanel2.Controls.Add(Me.Label1)
  246.         Me.BlendPanel2.Dock = System.Windows.Forms.DockStyle.Bottom
  247.         Me.BlendPanel2.Location = New System.Drawing.Point(0, 2)
  248.         Me.BlendPanel2.Name = "BlendPanel2"
  249.         Me.BlendPanel2.Size = New System.Drawing.Size(1021, 33)
  250.         Me.BlendPanel2.TabIndex = 0
  251.         '
  252.         'Button2
  253.         '
  254.         Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.System
  255.         Me.Button2.Location = New System.Drawing.Point(12, 4)
  256.         Me.Button2.Name = "Button2"
  257.         Me.Button2.Size = New System.Drawing.Size(110, 23)
  258.         Me.Button2.TabIndex = 3
  259.         Me.Button2.Text = "Nascondi  Opzioni"
  260.         '
  261.         'lblpath
  262.         '
  263.         Me.lblpath.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  264.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  265.         Me.lblpath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
  266.         Me.lblpath.Location = New System.Drawing.Point(205, 7)
  267.         Me.lblpath.Name = "lblpath"
  268.         Me.lblpath.ReadOnly = True
  269.         Me.lblpath.Size = New System.Drawing.Size(810, 21)
  270.         Me.lblpath.TabIndex = 2
  271.         '
  272.         'Label1
  273.         '
  274.         Me.Label1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  275.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  276.         Me.Label1.AutoSize = True
  277.         Me.Label1.BackColor = System.Drawing.Color.Transparent
  278.         Me.Label1.Location = New System.Drawing.Point(146, 11)
  279.         Me.Label1.Name = "Label1"
  280.         Me.Label1.Size = New System.Drawing.Size(62, 13)
  281.         Me.Label1.TabIndex = 1
  282.         Me.Label1.Text = "Percorso:"
  283.         '
  284.         'PanelBottom1
  285.         '
  286.         Me.PanelBottom1.Controls.Add(Me.sbStatusBar)
  287.         Me.PanelBottom1.Dock = System.Windows.Forms.DockStyle.Bottom
  288.         Me.PanelBottom1.Location = New System.Drawing.Point(0, 588)
  289.         Me.PanelBottom1.Name = "PanelBottom1"
  290.         Me.PanelBottom1.Size = New System.Drawing.Size(1021, 23)
  291.         Me.PanelBottom1.TabIndex = 2
  292.         '
  293.         'sbStatusBar
  294.         '
  295.         Me.sbStatusBar.Dock = System.Windows.Forms.DockStyle.Fill
  296.         Me.sbStatusBar.Location = New System.Drawing.Point(0, 0)
  297.         Me.sbStatusBar.Name = "sbStatusBar"
  298.         Me.sbStatusBar.Panels.AddRange(New System.Windows.Forms.StatusBarPanel() {Me.StatusBarPanel1, Me.StatusBarPanel2, Me.StatusBarPanel3})
  299.         Me.sbStatusBar.ShowPanels = True
  300.         Me.sbStatusBar.Size = New System.Drawing.Size(1021, 23)
  301.         Me.sbStatusBar.SizingGrip = False
  302.         Me.sbStatusBar.TabIndex = 17
  303.         '
  304.         'StatusBarPanel1
  305.         '
  306.         Me.StatusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring
  307.         Me.StatusBarPanel1.Name = "StatusBarPanel1"
  308.         Me.StatusBarPanel1.Width = 821
  309.         '
  310.         'StatusBarPanel2
  311.         '
  312.         Me.StatusBarPanel2.Name = "StatusBarPanel2"
  313.         '
  314.         'StatusBarPanel3
  315.         '
  316.         Me.StatusBarPanel3.Name = "StatusBarPanel3"
  317.         '
  318.         'PanelFiller1
  319.         '
  320.         Me.PanelFiller1.AutoScroll = True
  321.         Me.PanelFiller1.Controls.Add(Me.TabControl1)
  322.         Me.PanelFiller1.Dock = System.Windows.Forms.DockStyle.Fill
  323.         Me.PanelFiller1.Location = New System.Drawing.Point(217, 35)
  324.         Me.PanelFiller1.Name = "PanelFiller1"
  325.         Me.PanelFiller1.Size = New System.Drawing.Size(804, 553)
  326.         Me.PanelFiller1.TabIndex = 4
  327.         '
  328.         'TabControl1
  329.         '
  330.         Me.TabControl1.Controls.Add(Me.TabPage1)
  331.         Me.TabControl1.Controls.Add(Me.TabPage2)
  332.         Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill
  333.         Me.TabControl1.Location = New System.Drawing.Point(0, 0)
  334.         Me.TabControl1.Name = "TabControl1"
  335.         Me.TabControl1.SelectedIndex = 0
  336.         Me.TabControl1.Size = New System.Drawing.Size(804, 553)
  337.         Me.TabControl1.TabIndex = 0
  338.         '
  339.         'TabPage1
  340.         '
  341.         Me.TabPage1.AutoScroll = True
  342.         Me.TabPage1.Controls.Add(Me.lvListView)
  343.         Me.TabPage1.Controls.Add(Me.spSplitter)
  344.         Me.TabPage1.Controls.Add(Me.tvTreeView)
  345.         Me.TabPage1.Location = New System.Drawing.Point(4, 22)
  346.         Me.TabPage1.Name = "TabPage1"
  347.         Me.TabPage1.Size = New System.Drawing.Size(796, 527)
  348.         Me.TabPage1.TabIndex = 0
  349.         Me.TabPage1.Text = "Esplora"
  350.         Me.TabPage1.UseVisualStyleBackColor = True
  351.         '
  352.         'lvListView
  353.         '
  354.         Me.lvListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
  355.         Me.lvListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3, Me.ColumnHeader4})
  356.         Me.lvListView.ContextMenu = Me.cm1
  357.         Me.lvListView.Dock = System.Windows.Forms.DockStyle.Fill
  358.         Me.lvListView.Font = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  359.         Me.lvListView.Items.AddRange(New System.Windows.Forms.ListViewItem() {ListViewItem1, ListViewItem2, ListViewItem3, ListViewItem4})
  360.         Me.lvListView.LargeImageList = Me.ilMain
  361.         Me.lvListView.Location = New System.Drawing.Point(173, 0)
  362.         Me.lvListView.MultiSelect = False
  363.         Me.lvListView.Name = "lvListView"
  364.         Me.lvListView.Size = New System.Drawing.Size(623, 527)
  365.         Me.lvListView.SmallImageList = Me.ilSmall
  366.         Me.lvListView.Sorting = System.Windows.Forms.SortOrder.Ascending
  367.         Me.lvListView.TabIndex = 23
  368.         Me.lvListView.UseCompatibleStateImageBehavior = False
  369.         Me.lvListView.View = System.Windows.Forms.View.Details
  370.         '
  371.         'ColumnHeader1
  372.         '
  373.         Me.ColumnHeader1.Text = "Nome"
  374.         '
  375.         'ColumnHeader2
  376.         '
  377.         Me.ColumnHeader2.Text = "Grandezza"
  378.         Me.ColumnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
  379.         Me.ColumnHeader2.Width = 97
  380.         '
  381.         'ColumnHeader3
  382.         '
  383.         Me.ColumnHeader3.Text = "Tipo"
  384.         Me.ColumnHeader3.Width = 87
  385.         '
  386.         'ColumnHeader4
  387.         '
  388.         Me.ColumnHeader4.Text = "Ultima Modifica"
  389.         Me.ColumnHeader4.Width = 97
  390.         '
  391.         'ilMain
  392.         '
  393.         Me.ilMain.ImageStream = CType(resources.GetObject("ilMain.ImageStream"), System.Windows.Forms.ImageListStreamer)
  394.         Me.ilMain.TransparentColor = System.Drawing.Color.Transparent
  395.         Me.ilMain.Images.SetKeyName(0, "")
  396.         Me.ilMain.Images.SetKeyName(1, "")
  397.         Me.ilMain.Images.SetKeyName(2, "")
  398.         Me.ilMain.Images.SetKeyName(3, "")
  399.         Me.ilMain.Images.SetKeyName(4, "")
  400.         Me.ilMain.Images.SetKeyName(5, "")
  401.         Me.ilMain.Images.SetKeyName(6, "")
  402.         '
  403.         'ilSmall
  404.         '
  405.         Me.ilSmall.ImageStream = CType(resources.GetObject("ilSmall.ImageStream"), System.Windows.Forms.ImageListStreamer)
  406.         Me.ilSmall.TransparentColor = System.Drawing.Color.Transparent
  407.         Me.ilSmall.Images.SetKeyName(0, "")
  408.         Me.ilSmall.Images.SetKeyName(1, "")
  409.         Me.ilSmall.Images.SetKeyName(2, "")
  410.         Me.ilSmall.Images.SetKeyName(3, "")
  411.         Me.ilSmall.Images.SetKeyName(4, "")
  412.         Me.ilSmall.Images.SetKeyName(5, "")
  413.         Me.ilSmall.Images.SetKeyName(6, "")
  414.         Me.ilSmall.Images.SetKeyName(7, "")
  415.         Me.ilSmall.Images.SetKeyName(8, "")
  416.         Me.ilSmall.Images.SetKeyName(9, "")
  417.         Me.ilSmall.Images.SetKeyName(10, "")
  418.         Me.ilSmall.Images.SetKeyName(11, "")
  419.         Me.ilSmall.Images.SetKeyName(12, "")
  420.         Me.ilSmall.Images.SetKeyName(13, "")
  421.         Me.ilSmall.Images.SetKeyName(14, "")
  422.         Me.ilSmall.Images.SetKeyName(15, "")
  423.         Me.ilSmall.Images.SetKeyName(16, "")
  424.         Me.ilSmall.Images.SetKeyName(17, "")
  425.         Me.ilSmall.Images.SetKeyName(18, "")
  426.         Me.ilSmall.Images.SetKeyName(19, "")
  427.         '
  428.         'spSplitter
  429.         '
  430.         Me.spSplitter.BackColor = System.Drawing.SystemColors.ControlLight
  431.         Me.spSplitter.Location = New System.Drawing.Point(169, 0)
  432.         Me.spSplitter.MinSize = 100
  433.         Me.spSplitter.Name = "spSplitter"
  434.         Me.spSplitter.Size = New System.Drawing.Size(4, 527)
  435.         Me.spSplitter.TabIndex = 22
  436.         Me.spSplitter.TabStop = False
  437.         '
  438.         'tvTreeView
  439.         '
  440.         Me.tvTreeView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
  441.         Me.tvTreeView.Dock = System.Windows.Forms.DockStyle.Left
  442.         Me.tvTreeView.ImageIndex = 0
  443.         Me.tvTreeView.ImageList = Me.ilMain
  444.         Me.tvTreeView.Location = New System.Drawing.Point(0, 0)
  445.         Me.tvTreeView.Name = "tvTreeView"
  446.         Me.tvTreeView.SelectedImageIndex = 0
  447.         Me.tvTreeView.Size = New System.Drawing.Size(169, 527)
  448.         Me.tvTreeView.TabIndex = 20
  449.         '
  450.         'TabPage2
  451.         '
  452.         Me.TabPage2.AutoScroll = True
  453.         Me.TabPage2.Controls.Add(Me.listaProcessi)
  454.         Me.TabPage2.Location = New System.Drawing.Point(4, 22)
  455.         Me.TabPage2.Name = "TabPage2"
  456.         Me.TabPage2.Size = New System.Drawing.Size(796, 527)
  457.         Me.TabPage2.TabIndex = 1
  458.         Me.TabPage2.Text = "Task Manager"
  459.         Me.TabPage2.UseVisualStyleBackColor = True
  460.         '
  461.         'listaProcessi
  462.         '
  463.         Me.listaProcessi.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.colProcesso, Me.colTitolo, Me.colUtente, Me.colID, Me.colPriorità, Me.colHandle, Me.colThreads, Me.colOraAvvio})
  464.         Me.listaProcessi.Dock = System.Windows.Forms.DockStyle.Fill
  465.         Me.listaProcessi.FullRowSelect = True
  466.         Me.listaProcessi.GridLines = True
  467.         Me.listaProcessi.Location = New System.Drawing.Point(0, 0)
  468.         Me.listaProcessi.Name = "listaProcessi"
  469.         Me.listaProcessi.Size = New System.Drawing.Size(796, 527)
  470.         Me.listaProcessi.TabIndex = 2
  471.         Me.listaProcessi.UseCompatibleStateImageBehavior = False
  472.         Me.listaProcessi.View = System.Windows.Forms.View.Details
  473.         '
  474.         'colProcesso
  475.         '
  476.         Me.colProcesso.Text = "Nome Processo"
  477.         Me.colProcesso.Width = 100
  478.         '
  479.         'colTitolo
  480.         '
  481.         Me.colTitolo.Text = "Titolo"
  482.         Me.colTitolo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
  483.         Me.colTitolo.Width = 200
  484.         '
  485.         'colUtente
  486.         '
  487.         Me.colUtente.Text = "Risposta"
  488.         Me.colUtente.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
  489.         Me.colUtente.Width = 100
  490.         '
  491.         'colID
  492.         '
  493.         Me.colID.Text = "ID Sessione"
  494.         Me.colID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
  495.         '
  496.         'colPriorità
  497.         '
  498.         Me.colPriorità.Text = "Priorità"
  499.         '
  500.         'colHandle
  501.         '
  502.         Me.colHandle.Text = "Handle"
  503.         '
  504.         'colThreads
  505.         '
  506.         Me.colThreads.Text = "Threads"
  507.         '
  508.         'colOraAvvio
  509.         '
  510.         Me.colOraAvvio.Text = "Ora di avvio "
  511.         Me.colOraAvvio.Width = 120
  512.         '
  513.         'ImageList1
  514.         '
  515.         Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
  516.         Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
  517.         Me.ImageList1.Images.SetKeyName(0, "")
  518.         Me.ImageList1.Images.SetKeyName(1, "")
  519.         Me.ImageList1.Images.SetKeyName(2, "")
  520.         Me.ImageList1.Images.SetKeyName(3, "")
  521.         Me.ImageList1.Images.SetKeyName(4, "")
  522.         Me.ImageList1.Images.SetKeyName(5, "")
  523.         Me.ImageList1.Images.SetKeyName(6, "")
  524.         '
  525.         'tmTimer
  526.         '
  527.         Me.tmTimer.Enabled = True
  528.         Me.tmTimer.Interval = 10000
  529.         Me.tmTimer.SynchronizingObject = Me
  530.         '
  531.         'ImageList2
  532.         '
  533.         Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
  534.         Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
  535.         Me.ImageList2.Images.SetKeyName(0, "")
  536.         Me.ImageList2.Images.SetKeyName(1, "")
  537.         Me.ImageList2.Images.SetKeyName(2, "")
  538.         Me.ImageList2.Images.SetKeyName(3, "")
  539.         Me.ImageList2.Images.SetKeyName(4, "")
  540.         Me.ImageList2.Images.SetKeyName(5, "")
  541.         Me.ImageList2.Images.SetKeyName(6, "")
  542.         '
  543.         'MainMenu1
  544.         '
  545.         Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnufile, Me.mnuhelp})
  546.         '
  547.         'mnufile
  548.         '
  549.         Me.mnufile.Index = 0
  550.         Me.mnufile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuopen, Me.mnusep1, Me.mnuexit})
  551.         Me.mnufile.Text = "&File"
  552.         '
  553.         'mnuopen
  554.         '
  555.         Me.mnuopen.Index = 0
  556.         Me.mnuopen.Text = "&Apri"
  557.         '
  558.         'mnusep1
  559.         '
  560.         Me.mnusep1.Index = 1
  561.         Me.mnusep1.Text = "-"
  562.         '
  563.         'mnuexit
  564.         '
  565.         Me.mnuexit.Index = 2
  566.         Me.mnuexit.Text = "E&sci"
  567.         '
  568.         'mnuhelp
  569.         '
  570.         Me.mnuhelp.Index = 1
  571.         Me.mnuhelp.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuabout})
  572.         Me.mnuhelp.Text = "&Info"
  573.         '
  574.         'mnuabout
  575.         '
  576.         Me.mnuabout.Index = 0
  577.         Me.mnuabout.Text = "&Programmatore"
  578.         '
  579.         'OpenFileDialog1
  580.         '
  581.         Me.OpenFileDialog1.Filter = "Web Files|*.html;*.htm;*.jpeg;*.jpg;*.txt|All Files|*.*"
  582.         Me.OpenFileDialog1.Title = "Open WebFiles"
  583.         '
  584.         'OpenFileDialog2
  585.         '
  586.         Me.OpenFileDialog2.Filter = "Audio Files|*.mp3;*.wav;*.wma"
  587.         Me.OpenFileDialog2.Title = "Open Audio Files"
  588.         '
  589.         'BlendPanelLeft1
  590.         '
  591.         Me.BlendPanelLeft1.AutoScroll = True
  592.         Me.BlendPanelLeft1.BlendType = True
  593.         Me.BlendPanelLeft1.ColorEnd = System.Drawing.Color.DodgerBlue
  594.         Me.BlendPanelLeft1.ColorStart = System.Drawing.Color.LightSkyBlue
  595.         Me.BlendPanelLeft1.Controls.Add(Me.TaskControl4)
  596.         Me.BlendPanelLeft1.Controls.Add(Me.tbfilename)
  597.         Me.BlendPanelLeft1.Controls.Add(Me.TaskControl3)
  598.         Me.BlendPanelLeft1.Controls.Add(Me.Label3)
  599.         Me.BlendPanelLeft1.Controls.Add(Me.PanelTemp1)
  600.         Me.BlendPanelLeft1.Controls.Add(Me.TaskControl2)
  601.         Me.BlendPanelLeft1.Controls.Add(Me.PanelT2)
  602.         Me.BlendPanelLeft1.Controls.Add(Me.TaskControl1)
  603.         Me.BlendPanelLeft1.Controls.Add(Me.PanelT1)
  604.         Me.BlendPanelLeft1.Controls.Add(Me.PanelL2)
  605.         Me.BlendPanelLeft1.Controls.Add(Me.PanelL1)
  606.         Me.BlendPanelLeft1.Dock = System.Windows.Forms.DockStyle.Left
  607.         Me.BlendPanelLeft1.Location = New System.Drawing.Point(0, 35)
  608.         Me.BlendPanelLeft1.Name = "BlendPanelLeft1"
  609.         Me.BlendPanelLeft1.Size = New System.Drawing.Size(217, 553)
  610.         Me.BlendPanelLeft1.TabIndex = 3
  611.         '
  612.         'TaskControl4
  613.         '
  614.         Me.TaskControl4.BackColor = System.Drawing.Color.FromArgb(CType(CType(214, Byte), Integer), CType(CType(223, Byte), Integer), CType(CType(247, Byte), Integer))
  615.         Me.TaskControl4.Controls.Add(Me.Label6)
  616.         Me.TaskControl4.Controls.Add(Me.Label4)
  617.         Me.TaskControl4.Controls.Add(Me.Button8)
  618.         Me.TaskControl4.Controls.Add(Me.name1)
  619.         Me.TaskControl4.Controls.Add(Me.Label2)
  620.         Me.TaskControl4.Controls.Add(Me.Button1)
  621.         Me.TaskControl4.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  622.         Me.TaskControl4.HeaderText = "Task Manager"
  623.         Me.TaskControl4.Location = New System.Drawing.Point(12, 521)
  624.         Me.TaskControl4.Name = "TaskControl4"
  625.         Me.TaskControl4.Size = New System.Drawing.Size(199, 151)
  626.         Me.TaskControl4.TabIndex = 10
  627.         '
  628.         'Label6
  629.         '
  630.         Me.Label6.AutoSize = True
  631.         Me.Label6.Location = New System.Drawing.Point(10, 40)
  632.         Me.Label6.Name = "Label6"
  633.         Me.Label6.Size = New System.Drawing.Size(73, 13)
  634.         Me.Label6.TabIndex = 11
  635.         Me.Label6.Text = "Computer :"
  636.         '
  637.         'Label4
  638.         '
  639.         Me.Label4.AutoSize = True
  640.         Me.Label4.Location = New System.Drawing.Point(10, 68)
  641.         Me.Label4.Name = "Label4"
  642.         Me.Label4.Size = New System.Drawing.Size(98, 13)
  643.         Me.Label4.TabIndex = 9
  644.         Me.Label4.Text = "Processi Totali :"
  645.         '
  646.         'Button8
  647.         '
  648.         Me.Button8.Location = New System.Drawing.Point(13, 125)
  649.         Me.Button8.Name = "Button8"
  650.         Me.Button8.Size = New System.Drawing.Size(159, 23)
  651.         Me.Button8.TabIndex = 13
  652.         Me.Button8.Text = "Termina Processo Selez."
  653.         Me.Button8.UseVisualStyleBackColor = True
  654.         '
  655.         'name1
  656.         '
  657.         Me.name1.AutoSize = True
  658.         Me.name1.Location = New System.Drawing.Point(133, 40)
  659.         Me.name1.Name = "name1"
  660.         Me.name1.Size = New System.Drawing.Size(44, 13)
  661.         Me.name1.TabIndex = 10
  662.         Me.name1.Text = "Label5"
  663.         '
  664.         'Label2
  665.         '
  666.         Me.Label2.AutoSize = True
  667.         Me.Label2.Location = New System.Drawing.Point(133, 68)
  668.         Me.Label2.Name = "Label2"
  669.         Me.Label2.Size = New System.Drawing.Size(44, 13)
  670.         Me.Label2.TabIndex = 7
  671.         Me.Label2.Text = "Label2"
  672.         '
  673.         'Button1
  674.         '
  675.         Me.Button1.Location = New System.Drawing.Point(13, 96)
  676.         Me.Button1.Name = "Button1"
  677.         Me.Button1.Size = New System.Drawing.Size(159, 23)
  678.         Me.Button1.TabIndex = 12
  679.         Me.Button1.Text = "Aggiorna Processi"
  680.         Me.Button1.UseVisualStyleBackColor = True
  681.         '
  682.         'tbfilename
  683.         '
  684.         Me.tbfilename.Location = New System.Drawing.Point(20, 541)
  685.         Me.tbfilename.Name = "tbfilename"
  686.         Me.tbfilename.Size = New System.Drawing.Size(100, 21)
  687.         Me.tbfilename.TabIndex = 9
  688.         Me.tbfilename.Text = "null"
  689.         Me.tbfilename.Visible = False
  690.         '
  691.         'TaskControl3
  692.         '
  693.         Me.TaskControl3.BackColor = System.Drawing.Color.FromArgb(CType(CType(214, Byte), Integer), CType(CType(223, Byte), Integer), CType(CType(247, Byte), Integer))
  694.         Me.TaskControl3.Controls.Add(Me.img1)
  695.         Me.TaskControl3.Controls.Add(Me.adfilesize)
  696.         Me.TaskControl3.Controls.Add(Me.adfiletype)
  697.         Me.TaskControl3.Controls.Add(Me.adfilename)
  698.         Me.TaskControl3.Dock = System.Windows.Forms.DockStyle.Top
  699.         Me.TaskControl3.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  700.         Me.TaskControl3.HeaderText = "Dettagli"
  701.         Me.TaskControl3.Location = New System.Drawing.Point(11, 283)
  702.         Me.TaskControl3.Name = "TaskControl3"
  703.         Me.TaskControl3.Size = New System.Drawing.Size(200, 212)
  704.         Me.TaskControl3.TabIndex = 8
  705.         '
  706.         'img1
  707.         '
  708.         Me.img1.Location = New System.Drawing.Point(27, 108)
  709.         Me.img1.Name = "img1"
  710.         Me.img1.Size = New System.Drawing.Size(121, 96)
  711.         Me.img1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
  712.         Me.img1.TabIndex = 5
  713.         Me.img1.TabStop = False
  714.         '
  715.         'adfilesize
  716.         '
  717.         Me.adfilesize.Location = New System.Drawing.Point(8, 88)
  718.         Me.adfilesize.Name = "adfilesize"
  719.         Me.adfilesize.Size = New System.Drawing.Size(148, 14)
  720.         Me.adfilesize.TabIndex = 4
  721.         Me.adfilesize.Text = "dimensione"
  722.         '
  723.         'adfiletype
  724.         '
  725.         Me.adfiletype.Location = New System.Drawing.Point(8, 65)
  726.         Me.adfiletype.Name = "adfiletype"
  727.         Me.adfiletype.Size = New System.Drawing.Size(161, 15)
  728.         Me.adfiletype.TabIndex = 3
  729.         Me.adfiletype.Text = "Tipo"
  730.         '
  731.         'adfilename
  732.         '
  733.         Me.adfilename.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  734.         Me.adfilename.Location = New System.Drawing.Point(5, 43)
  735.         Me.adfilename.Name = "adfilename"
  736.         Me.adfilename.Size = New System.Drawing.Size(163, 19)
  737.         Me.adfilename.TabIndex = 2
  738.         Me.adfilename.Text = "Nome File"
  739.         '
  740.         'Label3
  741.         '
  742.         Me.Label3.BackColor = System.Drawing.Color.Transparent
  743.         Me.Label3.Dock = System.Windows.Forms.DockStyle.Top
  744.         Me.Label3.Location = New System.Drawing.Point(11, 267)
  745.         Me.Label3.Name = "Label3"
  746.         Me.Label3.Size = New System.Drawing.Size(200, 16)
  747.         Me.Label3.TabIndex = 7
  748.         '
  749.         'PanelTemp1
  750.         '
  751.         Me.PanelTemp1.Controls.Add(Me.Text1)
  752.         Me.PanelTemp1.Controls.Add(Me.tbtype)
  753.         Me.PanelTemp1.Controls.Add(Me.tbmodified)
  754.         Me.PanelTemp1.Controls.Add(Me.tbsize)
  755.         Me.PanelTemp1.Controls.Add(Me.it)
  756.         Me.PanelTemp1.Location = New System.Drawing.Point(84, 410)
  757.         Me.PanelTemp1.Name = "PanelTemp1"
  758.         Me.PanelTemp1.Size = New System.Drawing.Size(98, 31)
  759.         Me.PanelTemp1.TabIndex = 6
  760.         Me.PanelTemp1.Visible = False
  761.         '
  762.         'Text1
  763.         '
  764.         Me.Text1.Location = New System.Drawing.Point(64, 7)
  765.         Me.Text1.Name = "Text1"
  766.         Me.Text1.Size = New System.Drawing.Size(100, 21)
  767.         Me.Text1.TabIndex = 2
  768.         Me.Text1.Text = "TextBox1"
  769.         Me.Text1.Visible = False
  770.         '
  771.         'tbtype
  772.         '
  773.         Me.tbtype.Location = New System.Drawing.Point(132, 7)
  774.         Me.tbtype.Name = "tbtype"
  775.         Me.tbtype.Size = New System.Drawing.Size(100, 21)
  776.         Me.tbtype.TabIndex = 4
  777.         Me.tbtype.Text = "TextBox1"
  778.         '
  779.         'tbmodified
  780.         '
  781.         Me.tbmodified.Location = New System.Drawing.Point(5, 21)
  782.         Me.tbmodified.Name = "tbmodified"
  783.         Me.tbmodified.Size = New System.Drawing.Size(100, 21)
  784.         Me.tbmodified.TabIndex = 5
  785.         Me.tbmodified.Text = "TextBox1"
  786.         '
  787.         'tbsize
  788.         '
  789.         Me.tbsize.Location = New System.Drawing.Point(302, 10)
  790.         Me.tbsize.Name = "tbsize"
  791.         Me.tbsize.Size = New System.Drawing.Size(100, 21)
  792.         Me.tbsize.TabIndex = 3
  793.         Me.tbsize.Text = "TextBox1"
  794.         '
  795.         'it
  796.         '
  797.         Me.it.Location = New System.Drawing.Point(218, 11)
  798.         Me.it.Name = "it"
  799.         Me.it.Size = New System.Drawing.Size(100, 21)
  800.         Me.it.TabIndex = 1
  801.         Me.it.Text = "TextBox1"
  802.         Me.it.Visible = False
  803.         '
  804.         'TaskControl2
  805.         '
  806.         Me.TaskControl2.BackColor = System.Drawing.Color.FromArgb(CType(CType(214, Byte), Integer), CType(CType(223, Byte), Integer), CType(CType(247, Byte), Integer))
  807.         Me.TaskControl2.Controls.Add(Me.PictureBox2)
  808.         Me.TaskControl2.Controls.Add(Me.PictureBox1)
  809.         Me.TaskControl2.Controls.Add(Me.Button7)
  810.         Me.TaskControl2.Controls.Add(Me.Button6)
  811.         Me.TaskControl2.Controls.Add(Me.Button5)
  812.         Me.TaskControl2.Controls.Add(Me.Button4)
  813.         Me.TaskControl2.Controls.Add(Me.Button3)
  814.         Me.TaskControl2.Dock = System.Windows.Forms.DockStyle.Top
  815.         Me.TaskControl2.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  816.         Me.TaskControl2.HeaderText = "Player Musicale"
  817.         Me.TaskControl2.Location = New System.Drawing.Point(11, 130)
  818.         Me.TaskControl2.Name = "TaskControl2"
  819.         Me.TaskControl2.Size = New System.Drawing.Size(200, 137)
  820.         Me.TaskControl2.TabIndex = 5
  821.         '
  822.         'PictureBox2
  823.         '
  824.         Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
  825.         Me.PictureBox2.Location = New System.Drawing.Point(87, 98)
  826.         Me.PictureBox2.Name = "PictureBox2"
  827.         Me.PictureBox2.Size = New System.Drawing.Size(100, 46)
  828.         Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
  829.         Me.PictureBox2.TabIndex = 8
  830.         Me.PictureBox2.TabStop = False
  831.         '
  832.         'PictureBox1
  833.         '
  834.         Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
  835.         Me.PictureBox1.Location = New System.Drawing.Point(-3, 98)
  836.         Me.PictureBox1.Name = "PictureBox1"
  837.         Me.PictureBox1.Size = New System.Drawing.Size(92, 50)
  838.         Me.PictureBox1.TabIndex = 7
  839.         Me.PictureBox1.TabStop = False
  840.         '
  841.         'Button7
  842.         '
  843.         Me.Button7.FlatStyle = System.Windows.Forms.FlatStyle.System
  844.         Me.Button7.Location = New System.Drawing.Point(11, 70)
  845.         Me.Button7.Name = "Button7"
  846.         Me.Button7.Size = New System.Drawing.Size(61, 23)
  847.         Me.Button7.TabIndex = 6
  848.         Me.Button7.Text = "&Continua"
  849.         '
  850.         'Button6
  851.         '
  852.         Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.System
  853.         Me.Button6.Location = New System.Drawing.Point(122, 41)
  854.         Me.Button6.Name = "Button6"
  855.         Me.Button6.Size = New System.Drawing.Size(45, 23)
  856.         Me.Button6.TabIndex = 5
  857.         Me.Button6.Text = "&Stop"
  858.         '
  859.         'Button5
  860.         '
  861.         Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.System
  862.         Me.Button5.Location = New System.Drawing.Point(62, 40)
  863.         Me.Button5.Name = "Button5"
  864.         Me.Button5.Size = New System.Drawing.Size(53, 23)
  865.         Me.Button5.TabIndex = 4
  866.         Me.Button5.Text = "P&ausa"
  867.         '
  868.         'Button4
  869.         '
  870.         Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.System
  871.         Me.Button4.Location = New System.Drawing.Point(9, 40)
  872.         Me.Button4.Name = "Button4"
  873.         Me.Button4.Size = New System.Drawing.Size(46, 23)
  874.         Me.Button4.TabIndex = 3
  875.         Me.Button4.Text = "&Play"
  876.         '
  877.         'Button3
  878.         '
  879.         Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.System
  880.         Me.Button3.Location = New System.Drawing.Point(81, 70)
  881.         Me.Button3.Name = "Button3"
  882.         Me.Button3.Size = New System.Drawing.Size(87, 23)
  883.         Me.Button3.TabIndex = 2
  884.         Me.Button3.Text = "Apri File..."
  885.         '
  886.         'PanelT2
  887.         '
  888.         Me.PanelT2.BackColor = System.Drawing.Color.Transparent
  889.         Me.PanelT2.Dock = System.Windows.Forms.DockStyle.Top
  890.         Me.PanelT2.Enabled = False
  891.         Me.PanelT2.Location = New System.Drawing.Point(11, 115)
  892.         Me.PanelT2.Name = "PanelT2"
  893.         Me.PanelT2.Size = New System.Drawing.Size(200, 15)
  894.         Me.PanelT2.TabIndex = 4
  895.         '
  896.         'TaskControl1
  897.         '
  898.         Me.TaskControl1.BackColor = System.Drawing.Color.FromArgb(CType(CType(214, Byte), Integer), CType(CType(223, Byte), Integer), CType(CType(247, Byte), Integer))
  899.         Me.TaskControl1.Controls.Add(Me.LinkLabel1)
  900.         Me.TaskControl1.Controls.Add(Me.LinkLabel2)
  901.         Me.TaskControl1.Dock = System.Windows.Forms.DockStyle.Top
  902.         Me.TaskControl1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  903.         Me.TaskControl1.HeaderText = "File e Cartelle"
  904.         Me.TaskControl1.Location = New System.Drawing.Point(11, 13)
  905.         Me.TaskControl1.Name = "TaskControl1"
  906.         Me.TaskControl1.Size = New System.Drawing.Size(200, 102)
  907.         Me.TaskControl1.TabIndex = 3
  908.         '
  909.         'LinkLabel1
  910.         '
  911.         Me.LinkLabel1.FlatStyle = System.Windows.Forms.FlatStyle.System
  912.         Me.LinkLabel1.Image = CType(resources.GetObject("LinkLabel1.Image"), System.Drawing.Image)
  913.         Me.LinkLabel1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
  914.         Me.LinkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline
  915.         Me.LinkLabel1.Location = New System.Drawing.Point(11, 43)
  916.         Me.LinkLabel1.Name = "LinkLabel1"
  917.         Me.LinkLabel1.Size = New System.Drawing.Size(151, 17)
  918.         Me.LinkLabel1.TabIndex = 2
  919.         Me.LinkLabel1.TabStop = True
  920.         Me.LinkLabel1.Text = "Apri File Selez."
  921.         Me.LinkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
  922.         '
  923.         'LinkLabel2
  924.         '
  925.         Me.LinkLabel2.FlatStyle = System.Windows.Forms.FlatStyle.System
  926.         Me.LinkLabel2.Image = CType(resources.GetObject("LinkLabel2.Image"), System.Drawing.Image)
  927.         Me.LinkLabel2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
  928.         Me.LinkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline
  929.         Me.LinkLabel2.Location = New System.Drawing.Point(6, 77)
  930.         Me.LinkLabel2.Name = "LinkLabel2"
  931.         Me.LinkLabel2.Size = New System.Drawing.Size(159, 22)
  932.         Me.LinkLabel2.TabIndex = 3
  933.         Me.LinkLabel2.TabStop = True
  934.         Me.LinkLabel2.Text = "Play File Selez."
  935.         Me.LinkLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
  936.         Me.LinkLabel2.Visible = False
  937.         '
  938.         'PanelT1
  939.         '
  940.         Me.PanelT1.BackColor = System.Drawing.Color.Transparent
  941.         Me.PanelT1.Dock = System.Windows.Forms.DockStyle.Top
  942.         Me.PanelT1.Location = New System.Drawing.Point(11, 0)
  943.         Me.PanelT1.Name = "PanelT1"
  944.         Me.PanelT1.Size = New System.Drawing.Size(200, 13)
  945.         Me.PanelT1.TabIndex = 2
  946.         '
  947.         'PanelL2
  948.         '
  949.         Me.PanelL2.BackColor = System.Drawing.Color.Transparent
  950.         Me.PanelL2.Dock = System.Windows.Forms.DockStyle.Right
  951.         Me.PanelL2.Location = New System.Drawing.Point(211, 0)
  952.         Me.PanelL2.Name = "PanelL2"
  953.         Me.PanelL2.Size = New System.Drawing.Size(10, 672)
  954.         Me.PanelL2.TabIndex = 1
  955.         '
  956.         'PanelL1
  957.         '
  958.         Me.PanelL1.BackColor = System.Drawing.Color.Transparent
  959.         Me.PanelL1.Dock = System.Windows.Forms.DockStyle.Left
  960.         Me.PanelL1.Location = New System.Drawing.Point(0, 0)
  961.         Me.PanelL1.Name = "PanelL1"
  962.         Me.PanelL1.Size = New System.Drawing.Size(11, 672)
  963.         Me.PanelL1.TabIndex = 0
  964.         '
  965.         'Form1
  966.         '
  967.         Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
  968.         Me.AutoScroll = True
  969.         Me.AutoScrollMinSize = New System.Drawing.Size(640, 480)
  970.         Me.ClientSize = New System.Drawing.Size(1021, 611)
  971.         Me.Controls.Add(Me.PanelFiller1)
  972.         Me.Controls.Add(Me.BlendPanelLeft1)
  973.         Me.Controls.Add(Me.PanelBottom1)
  974.         Me.Controls.Add(Me.PanelTop1)
  975.         Me.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  976.         Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
  977.         Me.Menu = Me.MainMenu1
  978.         Me.Name = "Form1"
  979.         Me.ShowInTaskbar = False
  980.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  981.         Me.Text = "Cappa System"
  982.         Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
  983.         Me.PanelTop1.ResumeLayout(False)
  984.         Me.BlendPanel2.ResumeLayout(False)
  985.         Me.BlendPanel2.PerformLayout()
  986.         Me.PanelBottom1.ResumeLayout(False)
  987.         CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit()
  988.         CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()
  989.         CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).EndInit()
  990.         Me.PanelFiller1.ResumeLayout(False)
  991.         Me.TabControl1.ResumeLayout(False)
  992.         Me.TabPage1.ResumeLayout(False)
  993.         Me.TabPage2.ResumeLayout(False)
  994.         CType(Me.tmTimer, System.ComponentModel.ISupportInitialize).EndInit()
  995.         Me.BlendPanelLeft1.ResumeLayout(False)
  996.         Me.BlendPanelLeft1.PerformLayout()
  997.         Me.TaskControl4.ResumeLayout(False)
  998.         Me.TaskControl4.PerformLayout()
  999.         Me.TaskControl3.ResumeLayout(False)
  1000.         CType(Me.img1, System.ComponentModel.ISupportInitialize).EndInit()
  1001.         Me.PanelTemp1.ResumeLayout(False)
  1002.         Me.PanelTemp1.PerformLayout()
  1003.         Me.TaskControl2.ResumeLayout(False)
  1004.         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
  1005.         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
  1006.         Me.TaskControl1.ResumeLayout(False)
  1007.         Me.ResumeLayout(False)
  1008.  
  1009.     End Sub
  1010.  
  1011. #End Region
  1012.     Private ShowTP As Boolean = True
  1013.     Private currtab As Single = 0
  1014.     Private AudFilename As String = "Null"
  1015.     Dim Audio As New Audio.audio()
  1016.     Private Declare Auto Function GetDriveType Lib "KERNEL32" _
  1017.             (ByVal lpRootPathName As String) As Integer
  1018.     Private Const DRIVE_FIXED As Integer = 3
  1019.  
  1020.     Private Declare Function AssocQueryString Lib "shlwapi.dll" _
  1021.          Alias "AssocQueryStringA" (ByVal flags As Integer, _
  1022.          ByVal stringType As Integer, ByVal pszAssoc As String, _
  1023.          ByVal pszExtra As String, ByVal pszOut As String, ByRef pcchOut As Integer) _
  1024.          As Integer
  1025.     Private Const ASSOCSTR_FRIENDLYDOCNAME As Integer = 3
  1026.  
  1027.  
  1028.     Private Sub InitMYComp()
  1029.  
  1030.     End Sub
  1031.  
  1032.     Private Sub tmTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles tmTimer.Elapsed
  1033.         ' OPT: Date and time must be explicitly set on .NET StatusBar. Timer was added
  1034.         '     to facilitate time update.
  1035.         On Error GoTo err
  1036.         SetStatusBarDateTime()
  1037.         Exit Sub
  1038.     End Sub
  1039.  
  1040.     Private Sub tvTreeView_AfterSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvTreeView.AfterSelect
  1041.         ' OPT: The AfterSelect event is richer than the ActiveX TreeView's NodeClick
  1042.         '     event. It occurs after the tree node is selected, and provides information on
  1043.         '     which node was selected and how it was selected.
  1044.  
  1045.         'Dim currFldr As Scripting.Folder
  1046.         ' OPT: Use DirectoryInfo object instead of Scripting.Folder
  1047.         lvListView.Visible = True
  1048.         LinkLabel2.Visible = False
  1049.         adfilename.Text = ""
  1050.         adfilesize.Text = ""
  1051.         adfiletype.Text = ""
  1052.         Dim currFldr As DirectoryInfo
  1053.  
  1054.         'Dim fldr As Scripting.Folder
  1055.         ' OPT: Use DirectoryInfo object instead of Scripting.Folder
  1056.         Dim fldr As DirectoryInfo
  1057.  
  1058.         ' OPT: No need for FileSystemObject. We'll use DirectoryInfo object instead.
  1059.         'Dim fso As Scripting.FileSystemObject
  1060.         'fso = New Scripting.FileSystemObject()
  1061.  
  1062.         'currFldr = fso.GetFolder(eventArgs.node.FullPath)
  1063.         ' OPT: Use DirectoryInfo object
  1064.         currFldr = New DirectoryInfo(e.Node.FullPath)
  1065.  
  1066.         'lblPath.Text = eventArgs.node.FullPath
  1067.         ' OPT: Remove "\\" from TreeView's FullPath
  1068.         lblpath.Text = CleanupPath(e.Node.FullPath)
  1069.  
  1070.         DoHourglass(True)
  1071.  
  1072.         ' Add child nodes only if there aren't any now
  1073.         'If eventArgs.node.Children = 0 Then
  1074.         ' OPT: There's no Children property, so check number of nodes in this node's
  1075.         '     Nodes collection.
  1076.         If e.Node.Nodes.Count = 0 Then
  1077.             ' OPT: GetDirectories method provides an array of subfolders
  1078.             Try
  1079.                 For Each fldr In currFldr.GetDirectories
  1080.                     AddTVNode(e.Node, fldr.Name)
  1081.                 Next fldr
  1082.             Catch ex As Exception
  1083.                 MessageBox.Show(ex.Message, ex.Source)
  1084.                 GoTo err
  1085.             End Try
  1086.  
  1087.         End If
  1088.  
  1089.         ' OPT: Expand the folder to reveal its subfolders.
  1090.         e.Node.Expand()
  1091.  
  1092.         ' Add files to the ListView
  1093.         'lvListView.ListItems.Clear()
  1094.         ' OPT: Items property has replaced ListItems
  1095.         lvListView.Items.Clear()
  1096.  
  1097.         'Dim fl As Scripting.File
  1098.         ' OPT: Use FileInfo object instead of Scripting.File
  1099.         Dim fl As FileInfo
  1100.         Dim fext
  1101.         Dim totalFileSize As Long
  1102.         ' OPT: GetFiles method returns an array of files in the current folder
  1103.         Try
  1104.             For Each fl In currFldr.GetFiles
  1105.                 ' OPT: Length property provides file size
  1106.                 Try
  1107.                     totalFileSize = totalFileSize + fl.Length
  1108.                 Catch ex As OverflowException
  1109.                     MsgBox("Total file size exceeds the size of a Long variable. Displayed total file size will be incorrect.")
  1110.                 End Try
  1111.                 fext = fl.Extension()
  1112.                 ' OPT: File type is not available from the FileInfo object, so we'll
  1113.  
  1114.                 '     use an API function call.
  1115.                 AddListItem("", fl.Name, fl.Length, GetFileType(fl), fl.LastWriteTime.ToShortDateString, fext)
  1116.  
  1117.             Next fl
  1118.         Catch ex As Exception
  1119.             MessageBox.Show(ex.Message, ex.Source)
  1120.             DoHourglass(False)
  1121.             GoTo err
  1122.         End Try
  1123.  
  1124.         ' Show total files and space occupied
  1125.         Dim fileCtr As Short
  1126.         Dim message As String
  1127.  
  1128.         'fileCtr = currFldr.Files.Count
  1129.         ' OPT: Length property provides file count
  1130.         Try
  1131.             fileCtr = currFldr.GetFiles.Length
  1132.             message = fileCtr & " file" & IIf(fileCtr = 1, "  ", "s  ")
  1133.  
  1134.             'message = message & VB6.Format(totalFileSize, "###,###,##0") & " bytes"
  1135.             ' OPT: Use the .NET Format function, which has very compact syntax
  1136.             message = message & Format(totalFileSize, "n0") & " byte" & IIf(totalFileSize = 1, "  ", "s  ")
  1137.  
  1138.             'sbStatusBar.Panels(1).Text = message
  1139.             ' OPT: StatusBar's first panel has an index of zero
  1140.             sbStatusBar.Panels(0).Text = message
  1141.             it.Text = fileCtr
  1142.         Catch ex As Exception
  1143.             MessageBox.Show(ex.Message, ex.Source)
  1144.             DoHourglass(False)
  1145.             GoTo err
  1146.         End Try
  1147.  
  1148.         DoHourglass(False)
  1149.         Application.DoEvents()
  1150.         Exit Sub
  1151.         DoHourglass(False)
  1152.         lvListView.Items.Clear()
  1153.     End Sub
  1154.     Private Sub AddTVNode(ByRef parentNode As TreeNode, ByVal nodeText As String)
  1155.         ' Add a new TreeView node.
  1156.  
  1157.         'Dim newNode As MSComctlLib.Node
  1158.         ' OPT: Use TreeNode instead of ActiveX control's Node
  1159.         Dim newNode As TreeNode
  1160.  
  1161.         'newNode = tvTreeView.Nodes.Add(ParentNode, MSComctlLib.TreeRelationshipConstants.tvwChild, nodeKey, nodeText, "fldrClosed", "fldrOpen")
  1162.         ' OPT: Create the new node, then add it. The Add method allows a limited number
  1163.         '     of parameters.
  1164.         newNode = New TreeNode(nodeText, ImageIndex:=0, SelectedImageIndex:=1)
  1165.         parentNode.Nodes.Add(newNode)
  1166.     End Sub
  1167.  
  1168.     Private Function CleanupPath(ByVal path As String) As String
  1169.         ' OPT: The paths created by the Treeview control for its Node objects have
  1170.         '     ":\\" after the drive letter. This cleans up the extra backslash.
  1171.         Return path.Replace("\\", "\")
  1172.     End Function
  1173.  
  1174.     Private Sub DoHourglass(ByVal showHourglass As Boolean)
  1175.         ' Turns hourglass display on/off.
  1176.         ' Keeps track of how many nested calls have been made to the hourglass function.
  1177.  
  1178.         ' Was the cursor already an hourglass?
  1179.         Dim isHourglassPrev As Boolean
  1180.         ' Is the cursor an hourglass now?
  1181.         Dim isHourglassNow As Boolean
  1182.         ' How many nested routines have turned on the hourglass?
  1183.         Static hourGlassCtr As Short
  1184.  
  1185.         ' Note the current state of the cursor, then
  1186.         ' update the hourglass counter.
  1187.         isHourglassPrev = (hourGlassCtr > 0)
  1188.         If showHourglass Then
  1189.             hourGlassCtr = hourGlassCtr + 1
  1190.         Else
  1191.             hourGlassCtr = hourGlassCtr - 1
  1192.         End If
  1193.         If hourGlassCtr < 0 Then hourGlassCtr = 0
  1194.  
  1195.         ' Set the cursor, but only if it's different from what it is now.
  1196.         isHourglassNow = (hourGlassCtr > 0)
  1197.         If isHourglassNow <> isHourglassPrev Then
  1198.             If hourGlassCtr > 0 Then
  1199.                 Me.Cursor = Cursors.AppStarting
  1200.             Else
  1201.                 Me.Cursor = Cursors.Default
  1202.             End If
  1203.         End If
  1204.     End Sub
  1205.  
  1206.     Private Function GetFileType(ByRef fl As FileInfo) As String
  1207.         ' OPT: Get a file's Friendly Document Name.
  1208.  
  1209.         ' OPT: Create a 260 char string
  1210.         Dim strRet As New String(CChar(" "), 260)
  1211.         Dim lngRet As Integer = Len(strRet)
  1212.  
  1213.         ' OPT: Call the API function
  1214.         AssocQueryString(0, ASSOCSTR_FRIENDLYDOCNAME, fl.Extension, vbNullString, strRet, lngRet)
  1215.         strRet = strRet.Substring(0, lngRet - 1).Trim
  1216.  
  1217.         If Len(strRet) > 0 Then
  1218.             Return strRet
  1219.         ElseIf Len(fl.Extension) > 0 Then
  1220.             Return Mid(fl.Extension, 2) & " File"
  1221.         Else
  1222.             Return "File"
  1223.         End If
  1224.     End Function
  1225.  
  1226.     Private Sub SetStatusBarDateTime()
  1227.         ' OPT: Update the date and time on the StatusBar explicitly.
  1228.         sbStatusBar.Panels(1).Text = DateTime.Now.ToShortTimeString()
  1229.         sbStatusBar.Panels(2).Text = DateTime.Now.ToShortDateString()
  1230.     End Sub
  1231.  
  1232.  
  1233.     Private Sub lvListView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lvListView.Click
  1234.         Try
  1235.  
  1236.  
  1237.             Dim a, b, cu
  1238.             Dim fa, fb, fn
  1239.  
  1240.             a = lvListView.FocusedItem.Text
  1241.             cu = Microsoft.VisualBasic.Right(lblpath.Text, 1)
  1242.             If cu = "\" Then
  1243.                 b = lblpath.Text & a
  1244.             Else
  1245.                 b = lblpath.Text & "\" & a
  1246.             End If
  1247.             fn = b
  1248.             fb = Microsoft.VisualBasic.Right(fn, 3)
  1249.             fa = Microsoft.VisualBasic.LCase(fb)
  1250.             Text1.Text = fn
  1251.             tbfilename.Text = lvListView.FocusedItem.SubItems(0).Text
  1252.             tbsize.Text = lvListView.FocusedItem.SubItems(1).Text
  1253.             tbtype.Text = lvListView.FocusedItem.SubItems(2).Text
  1254.             tbmodified.Text = lvListView.FocusedItem.SubItems(3).Text
  1255.             dotpaction()
  1256.         Catch ex As Exception
  1257.             MessageBox.Show(ex.Message, ex.Source)
  1258.             Exit Sub
  1259.         End Try
  1260.  
  1261.     End Sub
  1262.  
  1263.     Private Sub AddListItem(ByVal itemKey As String, ByVal itemText As String, ByVal itemSize As Long, ByVal itemType As String, ByVal itemModified As DateTime, ByVal extension As String)
  1264.         ' Add a ListViewItem, then additional columns as SubItems.
  1265.  
  1266.         'Dim liListItem As MSComctlLib.ListItem
  1267.         ' OPT: ListViewItem replaces ListItem
  1268.         Dim lvItem As ListViewItem
  1269.         Dim inkb, inmb, indkb
  1270.         Dim rkb, rmb
  1271.         Dim ft
  1272.         inkb = itemSize
  1273.         indkb = inkb / 1024
  1274.         inmb = (inkb / 1024) / 1024
  1275.         rkb = Math.Round(indkb)
  1276.         rmb = Math.Round(inmb)
  1277.         ft = Microsoft.VisualBasic.LCase(extension)
  1278.         'liListItem = lvListView.ListItems.Add(, , itemText, "genericMedium", "genericSmall")
  1279.         ' OPT: The .NET TreeView's Add method has different arguments
  1280.         If ft = ".bmp" Then
  1281.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=1)
  1282.             GoTo cont
  1283.         End If
  1284.         If ft = ".gif" Then
  1285.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=1)
  1286.             GoTo cont
  1287.         End If
  1288.         If ft = ".jpg" Then
  1289.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=1)
  1290.             GoTo cont
  1291.         End If
  1292.         If ft = ".jpeg" Then
  1293.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=1)
  1294.             GoTo cont
  1295.         End If
  1296.         If ft = ".psd" Then
  1297.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=16)
  1298.             GoTo cont
  1299.         End If
  1300.         If ft = ".tiff" Then
  1301.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=1)
  1302.             GoTo cont
  1303.         End If
  1304.         'Sound files
  1305.         If ft = ".wma" Then
  1306.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=19)
  1307.             GoTo cont
  1308.         End If
  1309.         If ft = ".mp3" Then
  1310.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=19)
  1311.             GoTo cont
  1312.         End If
  1313.         If ft = ".wav" Then
  1314.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=19)
  1315.             GoTo cont
  1316.         End If
  1317.         'Video files
  1318.         If ft = ".mpg" Then
  1319.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=7)
  1320.             GoTo cont
  1321.         End If
  1322.         If ft = ".avi" Then
  1323.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=7)
  1324.             GoTo cont
  1325.         End If
  1326.         If ft = ".mpeg" Then
  1327.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=7)
  1328.             GoTo cont
  1329.         End If
  1330.         If ft = ".wmv" Then
  1331.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=7)
  1332.             GoTo cont
  1333.         End If
  1334.         'Text files
  1335.         If ft = ".txt" Then
  1336.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=2)
  1337.             GoTo cont
  1338.         End If
  1339.         If ft = ".rtf" Then
  1340.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=2)
  1341.             GoTo cont
  1342.         End If
  1343.         'Dlls
  1344.         If ft = ".dll" Then
  1345.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=4)
  1346.             GoTo cont
  1347.         End If
  1348.         'Infs
  1349.         If ft = ".inf" Then
  1350.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=6)
  1351.             GoTo cont
  1352.         End If
  1353.         'Inis
  1354.         If ft = ".ini" Then
  1355.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=6)
  1356.             GoTo cont
  1357.         End If
  1358.         'zip,cabs
  1359.         If ft = ".zip" Then
  1360.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=8)
  1361.             GoTo cont
  1362.         End If
  1363.         If ft = ".cab" Then
  1364.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=8)
  1365.             GoTo cont
  1366.         End If
  1367.         'Htmls
  1368.         If ft = ".html" Then
  1369.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=5)
  1370.             GoTo cont
  1371.         End If
  1372.         If ft = ".htm" Then
  1373.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=5)
  1374.             GoTo cont
  1375.         End If
  1376.         If ft = ".asp" Then
  1377.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=4)
  1378.             GoTo cont
  1379.         End If
  1380.         If ft = ".aspx" Then
  1381.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=5)
  1382.             GoTo cont
  1383.         End If
  1384.         If ft = ".exe" Then
  1385.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=0)
  1386.             GoTo cont
  1387.         End If
  1388.         If ft = ".hlp" Then
  1389.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=10)
  1390.             GoTo cont
  1391.         End If
  1392.         If ft = ".chm" Then
  1393.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=11)
  1394.             GoTo cont
  1395.         End If
  1396.         If ft = ".doc" Then
  1397.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=12)
  1398.             GoTo cont
  1399.         End If
  1400.         If ft = ".mdb" Then
  1401.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=13)
  1402.             GoTo cont
  1403.         End If
  1404.         If ft = ".msi" Then
  1405.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=14)
  1406.             GoTo cont
  1407.         End If
  1408.         If ft = ".ppt" Then
  1409.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=15)
  1410.             GoTo cont
  1411.         End If
  1412.         If ft = ".pdf" Then
  1413.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=16)
  1414.             GoTo cont
  1415.         End If
  1416.         If ft = ".xls" Then
  1417.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=17)
  1418.             GoTo cont
  1419.         End If
  1420.         If ft = ".swf" Then
  1421.             lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=18)
  1422.             GoTo cont
  1423.         End If
  1424.         lvItem = lvListView.Items.Add(text:=itemText, imageIndex:=9)
  1425. cont:
  1426.         If inmb <= 1 Then
  1427.             With lvItem.SubItems
  1428.                 .Add(text:=rkb & " KB")
  1429.                 .Add(text:=itemType)
  1430.                 .Add(text:=itemModified)
  1431.             End With
  1432.         Else
  1433.             With lvItem.SubItems
  1434.                 .Add(text:=rmb & " MB")
  1435.                 .Add(text:=itemType)
  1436.                 .Add(text:=itemModified)
  1437.             End With
  1438.         End If
  1439.     End Sub
  1440.     Private Sub dotpaction()
  1441.         Dim fa, fb, fn
  1442.         fn = Text1.Text
  1443.         If fn = "null" Then
  1444.             Exit Sub
  1445.         End If
  1446.         fb = Microsoft.VisualBasic.Right(fn, 3)
  1447.         fa = LCase(fb)
  1448.         adfilename.Text = tbfilename.Text
  1449.         adfilesize.Text = tbsize.Text
  1450.         adfiletype.Text = tbtype.Text
  1451.         If fa = "mp3" Then
  1452.             GoTo showmp
  1453.         ElseIf fa = "wma" Then
  1454.             GoTo showmp
  1455.         ElseIf fa = "wav" Then
  1456.             GoTo showmp
  1457.         End If
  1458.         LinkLabel2.Visible = False
  1459.         Dim shouldshowpic As Boolean = False
  1460.         If fa = "bmp" Then
  1461.             shouldshowpic = True
  1462.         ElseIf fa = "jpg" Then
  1463.             shouldshowpic = True
  1464.         ElseIf fa = "peg" Then
  1465.             shouldshowpic = True
  1466.         ElseIf fa = "gif" Then
  1467.             shouldshowpic = True
  1468.         ElseIf fa = "png" Then
  1469.             shouldshowpic = True
  1470.         ElseIf fa = "iff" Then
  1471.             shouldshowpic = True
  1472.         Else
  1473.             shouldshowpic = False
  1474.         End If
  1475.         If shouldshowpic = True Then
  1476.             GoTo cont
  1477.         Else
  1478.             GoTo noimg
  1479.         End If
  1480. cont:
  1481.         Try
  1482.             img1.Image = Image.FromFile(Text1.Text)
  1483.         Catch ex As Exception
  1484.             MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error)
  1485.         End Try
  1486.         Exit Sub
  1487. noimg:
  1488.         Try
  1489.             img1.Image = Nothing
  1490.         Catch ex As Exception
  1491.             MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error)
  1492.         End Try
  1493.  
  1494.         Exit Sub
  1495. showmp:
  1496.         LinkLabel2.Visible = True
  1497.     End Sub
  1498.  
  1499.     Private Sub lvListView_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles lvListView.KeyUp
  1500.         If e.KeyCode = Keys.Up Then
  1501.             GoTo handled
  1502.         End If
  1503.         If e.KeyCode = Keys.Down Then
  1504.             GoTo handled
  1505.         End If
  1506.         Exit Sub
  1507. handled:
  1508.         lvListView_Click(Me, e)
  1509.     End Sub
  1510.  
  1511.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
  1512.         ' Task manager
  1513.         Dim nomeComputer As String = System.Environment.MachineName.ToString
  1514.         Me.name1.Text = nomeComputer
  1515.  
  1516.         Dim Processi() As Process
  1517.         Dim z As Integer
  1518.         Dim voceLista As ListViewItem
  1519.         Try
  1520.             listaProcessi.Items.Clear()
  1521.             Processi = Process.GetProcesses(nomeComputer)
  1522.             For z = 0 To UBound(Processi)
  1523.                 voceLista = listaProcessi.Items.Add(Processi(z).ProcessName.ToString)
  1524.  
  1525.                 If nomeComputer <> System.Environment.MachineName Then
  1526.                     voceLista.SubItems.Add("Non Disponibile")
  1527.                     voceLista.SubItems.Add(Processi(z).Id)
  1528.                 Else
  1529.                     voceLista.SubItems.Add(Processi(z).MainWindowTitle)
  1530.                     voceLista.SubItems.Add(Processi(z).Responding)
  1531.                     voceLista.SubItems.Add(Processi(z).Id)
  1532.                     voceLista.SubItems.Add(Processi(z).PriorityClass)
  1533.                     voceLista.SubItems.Add(Processi(z).HandleCount)
  1534.                     voceLista.SubItems.Add(Processi(z).Threads.Count)
  1535.                     voceLista.SubItems.Add(Processi(z).StartTime)
  1536.                 End If
  1537.  
  1538.             Next
  1539.         Catch
  1540.             listaProcessi.Items.Add("Errore nell' inserimento di alcuni processi...")
  1541.         End Try
  1542.         Me.Label2.Text = Me.listaProcessi.Items.Count.ToString
  1543.  
  1544.  
  1545.         ' OPT: Use .NET's native objects instead of COM-based objects
  1546.  
  1547.         'Dim currFldr As Scripting.Folder
  1548.         ' OPT: Use DirectoryInfo object instead of Scripting.Folder
  1549.         mnuopen.Visible = False
  1550.         mnusep1.Visible = False
  1551.         Label1.Visible = True
  1552.         lblpath.Visible = True
  1553.         Try
  1554.  
  1555.  
  1556.             Dim currFldr As DirectoryInfo
  1557.  
  1558.             'Dim drv As Scripting.Drive
  1559.             ' OPT: GetLogicalDrives (below) returns a string array, so declare drv as a string
  1560.             Dim drv As String
  1561.  
  1562.             'Dim fldr As Scripting.Folder
  1563.             ' OPT: Use DirectoryInfo object instead of Scripting.Folder
  1564.             Dim fldr As DirectoryInfo
  1565.  
  1566.             'Dim nodRoot As MSComctlLib.Node
  1567.             ' OPT: Use TreeNode object instead ActiveX control Node object
  1568.             Dim nodRoot As TreeNode
  1569.  
  1570.             ' OPT: No need for FileSystemObject. We'll use Directory object instead.
  1571.             'Dim fso As Scripting.FileSystemObject
  1572.             'fso = New Scripting.FileSystemObject()
  1573.  
  1574.             ' OPT: Set the TreeView's Sorted property once for all levels.
  1575.             tvTreeView.Sorted = True
  1576.             With lvListView
  1577.                 .Columns(0).Width = 198
  1578.                 .Columns(1).Width = 66
  1579.                 .Columns(2).Width = 180
  1580.                 .Columns(3).Width = 78
  1581.             End With
  1582.             ' Populate level 1 of the TreeView
  1583.             DoHourglass(True)
  1584.             'For Each drv In fso.Drives
  1585.             ' OPT: Use System.IO.Directory instead of Scripting.FileSystemObject
  1586.             For Each drv In Directory.GetLogicalDrives()
  1587.                 'If drv.IsReady Then
  1588.                 ' OPT: Instead of checking for drive readiness, include only fixed drives
  1589.                 If GetDriveType(drv) = DRIVE_FIXED Then
  1590.                     'nodRoot = tvTreeView.Nodes.Add(, , drv.RootFolder.Path, drv.DriveLetter & ":")
  1591.                     ' OPT: Add method takes fewer parameters, Text or Node only.
  1592.                     nodRoot = tvTreeView.Nodes.Add(drv)
  1593.                     'With nodRoot
  1594.                     '    .Image = "drive"
  1595.                     '    .Sorted = True
  1596.                     'End With
  1597.                     ' OPT: Use numeric Index. Key not available.
  1598.                     With nodRoot
  1599.                         .ImageIndex = 2
  1600.                         ' OPT: Must set SelectedImageIndex or it will default to first image in
  1601.                         '     ImageList. No need to set Sorted on  a per-node basis, as above.
  1602.                         .SelectedImageIndex = 2
  1603.                     End With
  1604.  
  1605.                     ' Get a pointer to the root folder
  1606.                     'currFldr = drv.RootFolder
  1607.                     ' OPT: Handled below
  1608.  
  1609.                     ' Populate level 2 of the TreeView
  1610.                     currFldr = New DirectoryInfo(nodRoot.FullPath)
  1611.                     ' OPT: GetDirectories method provides an array of subfolders
  1612.                     For Each fldr In currFldr.GetDirectories
  1613.                         AddTVNode(nodRoot, fldr.Name)
  1614.                     Next fldr
  1615.                 End If
  1616.             Next drv
  1617.             ' OPT: Date and time must be explicitly set on .NET StatusBar
  1618.             SetStatusBarDateTime()
  1619.  
  1620.             DoHourglass(False)
  1621.             Application.DoEvents()
  1622.         Catch ex As Exception
  1623.             MessageBox.Show(ex.Message, ex.Source)
  1624.             lvListView.Visible = False
  1625.             Exit Sub
  1626.         End Try
  1627.         lvListView.Visible = False
  1628.     End Sub
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  1636.         If ShowTP = True Then
  1637.             ShowTP = False
  1638.             BlendPanelLeft1.Visible = False
  1639.             Button2.Text = "Mostra Opzioni"
  1640.             Exit Sub
  1641.         End If
  1642.         If ShowTP = False Then
  1643.             ShowTP = True
  1644.             BlendPanelLeft1.Visible = True
  1645.             BlendPanelLeft1.Refresh()
  1646.             Button2.Text = "Nascondi Opzioni"
  1647.             Exit Sub
  1648.         End If
  1649.     End Sub
  1650.  
  1651.     Private Sub TabControl1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.Click
  1652.         Me.Text = "Cappa System"
  1653.         currtab = TabControl1.SelectedIndex.ToString
  1654.         If currtab = 0 Then
  1655.             mnuopen.Visible = False
  1656.             mnusep1.Visible = False
  1657.             Label1.Visible = True
  1658.             lblpath.Visible = True
  1659.         ElseIf currtab = 1 Then
  1660.             mnuopen.Visible = True
  1661.             mnusep1.Visible = True
  1662.             Label1.Visible = False
  1663.             lblpath.Visible = False
  1664.         End If
  1665.     End Sub
  1666.  
  1667.  
  1668.  
  1669.     Private Sub mnuexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuexit.Click
  1670.         Application.Exit()
  1671.     End Sub
  1672.  
  1673.     Private Sub mnuabout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuabout.Click
  1674.         MessageBox.Show("Cappa System " & Application.ProductVersion & vbCrLf & "(C) Copyright VB.NET_Program_91,2008-2009 " & vbCrLf & "email: VBNET_Program_91@Pierotofy.it", "Informazioni", MessageBoxButtons.OK, MessageBoxIcon.Information)
  1675.     End Sub
  1676.  
  1677.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  1678.         If OpenFileDialog2.ShowDialog = DialogResult.OK Then
  1679.             Audio.audioFile = OpenFileDialog2.FileName
  1680.             Audio.audioPlay()
  1681.         End If
  1682.     End Sub
  1683.  
  1684.     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  1685.         Audio.audioPlay()
  1686.     End Sub
  1687.  
  1688.     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  1689.         Audio.audioPause()
  1690.     End Sub
  1691.  
  1692.     Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  1693.         Audio.audioStop()
  1694.     End Sub
  1695.  
  1696.     Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
  1697.         Audio.audioResume()
  1698.     End Sub
  1699.     Private Sub HandleTextofmenu(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuopen.Select, mnuexit.Select, mnuabout.Select, mnufile.Select, mnuhelp.Select
  1700.         Dim strText As String = "completato..."
  1701.         If sender Is mnuopen Then
  1702.             strText = "Apri file"
  1703.         ElseIf sender Is mnuexit Then
  1704.             strText = "Clicca per uscire dall' applicazione"
  1705.         ElseIf sender Is mnuabout Then
  1706.             strText = "View the Product Information"
  1707.         Else
  1708.             strText = "Completato..."
  1709.         End If
  1710.         WriteStatus(strText)
  1711.     End Sub
  1712.  
  1713.     Private Sub wb1_StatusTextChange(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_StatusTextChangeEvent)
  1714.         Dim Te As String = e.text
  1715.         StatusBarPanel1.Text = Te
  1716.     End Sub
  1717.     Private Sub WriteStatus(ByVal DText As String)
  1718.         StatusBarPanel1.Text = DText
  1719.     End Sub
  1720.     Private Sub ClearStatusBar()
  1721.         StatusBarPanel1.Text = "Completato..."
  1722.     End Sub
  1723.  
  1724.     Private Sub adfilename_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles adfilename.TextChanged
  1725.         Dim totallen As Integer = Len(adfilename.Text)
  1726.         If totallen >= 18 Then
  1727.             adfilename.Text = Microsoft.VisualBasic.Left(adfilename.Text, 15) & "..."
  1728.         End If
  1729.     End Sub
  1730.  
  1731.     Private Sub adfiletype_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles adfiletype.TextChanged
  1732.         Dim totallen1 As Integer = Len(adfiletype.Text)
  1733.         If totallen1 >= 25 Then
  1734.             adfiletype.Text = Microsoft.VisualBasic.Left(adfiletype.Text, 22) & "..."
  1735.         End If
  1736.     End Sub
  1737.  
  1738.     Private Sub LinkLabel2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkLabel2.Click
  1739.         Audio.audioFile = Text1.Text
  1740.         Audio.audioPlay()
  1741.     End Sub
  1742.  
  1743.     Private Sub LinkLabel1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkLabel1.Click
  1744.         Try
  1745.             System.Diagnostics.Process.Start(Text1.Text)
  1746.         Catch ex As Exception
  1747.             MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error)
  1748.         End Try
  1749.     End Sub
  1750.  
  1751.     Private Sub lvListView_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lvListView.DoubleClick
  1752.         Dim fa, fb, fn
  1753.         fn = Text1.Text
  1754.         If fn = "null" Then
  1755.             Exit Sub
  1756.         End If
  1757.         fb = Microsoft.VisualBasic.Right(fn, 3)
  1758.         fa = LCase(fb)
  1759.         If fa = "mp3" Then
  1760.             ShowMPd()
  1761.             Exit Sub
  1762.         ElseIf fa = "wma" Then
  1763.             ShowMPd()
  1764.             Exit Sub
  1765.         ElseIf fa = "wav" Then
  1766.             ShowMPd()
  1767.             Exit Sub
  1768.         End If
  1769.         Try
  1770.             System.Diagnostics.Process.Start(Text1.Text)
  1771.         Catch ex As Exception
  1772.             MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error)
  1773.         End Try
  1774.     End Sub
  1775.     Private Sub ShowMPd()
  1776.         Dim a As DialogResult
  1777.         a = MessageBox.Show("Vuoi riprodurre il file multimediale con il lettore interno?", "Esegui con Player Musicale", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information)
  1778.         If a = DialogResult.Yes Then
  1779.             Audio.audioFile = Text1.Text
  1780.             Audio.audioPlay()
  1781.         ElseIf a = DialogResult.No Then
  1782.             GoTo ext
  1783.         End If
  1784.         Exit Sub
  1785. ext:
  1786.         Try
  1787.             System.Diagnostics.Process.Start(Text1.Text)
  1788.         Catch ex As Exception
  1789.             MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error)
  1790.         End Try
  1791.     End Sub
  1792.  
  1793.     Private Sub lvListView_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lvListView.SelectedIndexChanged
  1794.  
  1795.     End Sub
  1796.  
  1797.     Private Sub sbStatusBar_PanelClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles sbStatusBar.PanelClick
  1798.  
  1799.     End Sub
  1800.  
  1801.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  1802.         Dim nomeComputer As String = System.Environment.MachineName.ToString
  1803.         Me.name1.Text = nomeComputer
  1804.  
  1805.         Dim Processi() As Process
  1806.         Dim z As Integer
  1807.         Dim voceLista As ListViewItem
  1808.         Try
  1809.             listaProcessi.Items.Clear()
  1810.             Processi = Process.GetProcesses(nomeComputer)
  1811.             For z = 0 To UBound(Processi)
  1812.                 voceLista = listaProcessi.Items.Add(Processi(z).ProcessName.ToString)
  1813.  
  1814.                 If nomeComputer <> System.Environment.MachineName Then
  1815.                     voceLista.SubItems.Add("Non Disponibile")
  1816.                     voceLista.SubItems.Add(Processi(z).Id)
  1817.                 Else
  1818.                     voceLista.SubItems.Add(Processi(z).MainWindowTitle)
  1819.                     voceLista.SubItems.Add(Processi(z).Responding)
  1820.                     voceLista.SubItems.Add(Processi(z).Id)
  1821.                     voceLista.SubItems.Add(Processi(z).PriorityClass)
  1822.                     voceLista.SubItems.Add(Processi(z).HandleCount)
  1823.                     voceLista.SubItems.Add(Processi(z).Threads.Count)
  1824.                     voceLista.SubItems.Add(Processi(z).StartTime)
  1825.                 End If
  1826.  
  1827.             Next
  1828.         Catch
  1829.             listaProcessi.Items.Add("Errore nell' inserimento di alcuni processi...")
  1830.         End Try
  1831.         Me.Label2.Text = Me.listaProcessi.Items.Count.ToString
  1832.  
  1833.     End Sub
  1834.  
  1835.     Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
  1836.         Dim Processo As Process
  1837.  
  1838.         If name1.Text = System.Environment.MachineName.ToString Then
  1839.             Try
  1840.                 Processo = Process.GetProcessById(listaProcessi.SelectedItems(0).SubItems(3).Text)
  1841.                 Processo.Kill()
  1842.                 listaProcessi.Items.Remove(listaProcessi.SelectedItems.Item(0))
  1843.             Catch
  1844.                 MessageBox.Show("Impossibile terminare il processo selezionato ", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error)
  1845.             End Try
  1846.         Else
  1847.             MessageBox.Show("Impossibile terminare il processo selezionato ", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error)
  1848.         End If
  1849.     End Sub
  1850. End Class