File manager : File manager « GUI Applications « VB.Net Tutorial

VB.Net Tutorial
1. Language Basics
2. Data Type
3. Operator
4. Statements
5. Date Time
6. Class Module
7. Development
8. Collections
9. Generics
10. Attributes
11. Event
12. Stream File
13. GUI
14. GUI Applications
15. 2D Graphics
16. I18N Internationlization
17. Reflection
18. Regular Expressions
19. Security
20. Socket Network
21. Thread
22. Windows
23. XML
24. Database ADO.net
25. Design Patterns
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial » GUI Applications » File manager 
14. 11. 3. File manager
 


'Visual Basic.Net JingCai Programming 100 Examples
'Author: Yong Zhang
'Publisher: Water Publisher China
'ISBN: 750841156

Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Collections
Imports System.Windows.Forms

public class FileManager
   public Shared Sub Main
        Application.Run(New MainForm)
   End Sub
End class


Public Class MainForm
    Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As StringAs Integer
    Private Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" _
    (ByVal lpDirectoryName As String, _
    ByRef lpFreeBytesAvailableToCaller As Long, _
    ByRef lpTotalNumberOfBytes As Long, _
    ByRef lpTotalNumberOfFreeBytes As LongAs Long
    Dim nDirLevel As Integer

    Private Sub ListDrives()
        Dim tn As TreeNode
        Dim drives() As String = Directory.GetLogicalDrives()
        tvDir.BeginUpdate()
        Dim As Integer
        For i = To drives.Length - 1
            Select Case GetDriveType(drives(i))
                Case 'Flooy disk
                    tn = New TreeNode(drives(i)00)

                Case '' Dard drive
                    tn = New TreeNode(drives(i)11)
                    ListDirs(tn, drives(i)) 

                Case 'DVD
                    tn = New TreeNode(drives(i)22)

                Case Else '
                    tn = New TreeNode(drives(i)00)

            End Select
            tvDir.Nodes.Add(tn)
        Next i
        tvDir.EndUpdate()

        tvDir.SelectedNode = tvDir.Nodes(1)
    End Sub

    Private Sub ListDirs(ByVal tn As TreeNode, ByVal strDir As String)
        If nDirLevel > Then   'Level
            nDirLevel = 0
            Exit Sub
        End If
        nDirLevel += 1
        Dim arrDirs() As String
        Dim tmpNode As TreeNode

        Try
            arrDirs = Directory.GetDirectories(strDir)
            If arrDirs.Length = Then Exit Sub
            Dim As Integer
            For i = To arrDirs.Length - 1

                tmpNode = New TreeNode(Path.GetFileName(arrDirs(i))34)
                ListDirs(tmpNode, arrDirs(i))
                tn.Nodes.Add(tmpNode)
            Next i
        Catch
            Exit Sub
        End Try
    End Sub

    Private Sub ListDirsAndFiles(ByVal strDir As String)
        Dim lvi As ListViewItem
        Dim nImgIndex As Integer
        Dim items(4As String
        Dim dirs() As String
        Dim files() As String
        Try
            dirs = Directory.GetDirectories(strDir)
            files = Directory.GetFiles(strDir)
        Catch
            Exit Sub
        End Try

        lvFiles.BeginUpdate()
        lvFiles.Clear()
        lvFiles.Columns.AddRange_
        New System.Windows.Forms.ColumnHeader() {chName, chSize, chType, chTime})
        Dim As Integer
        For i = To dirs.Length - 1
            items(0= Path.GetFileName(dirs(i))
            items(1""
            items(2"Folder"
            items(3= Directory.GetLastWriteTime(dirs(i)).ToLongDateString() " " + Directory.GetLastWriteTime(dirs(i)).ToLongTimeString()
            lvi = New ListViewItem(items, 3)
            lvFiles.Items.Add(lvi)
        Next i

        For i = To files.Length - 1
            Dim ext As String = (Path.GetExtension(files(i))).ToLower()
            If (ext = ".txt"Then
                nImgIndex = 5
            ElseIf (ext = ".bmp"Then
                nImgIndex = 6
            ElseIf (ext = ".hlp"Then
                nImgIndex = 7
            ElseIf (ext = ".exe"Then
                nImgIndex = 8
            Else
                nImgIndex = 9
            End If

            items(0= Path.GetFileName(files(i))
            Dim fi As FileInfo = New FileInfo(files(i))
            items(1= fi.Length.ToString()
            items(2= ext + "File"
            items(3= fi.LastWriteTime.ToLongDateString() "  " + fi.LastWriteTime.ToLongTimeString()
            lvi = New ListViewItem(items, nImgIndex)
            lvFiles.Items.Add(lvi)
        Next i
        lvFiles.EndUpdate()
    End Sub

    Private Sub OpenFile()

        If lvFiles.SelectedItems.Count <= Then
            MessageBox.Show(Me, "Open file""File", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            Exit Sub
        End If
        Dim lvi As ListViewItem = lvFiles.SelectedItems(0)
        If ((Path.GetExtension(lvi.Text)).ToLower() <> ".txt"Then
            MessageBox.Show(Me, "Text file only""Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            Return
        End If

        Dim FileForm As ContentForm = New ContentForm()
        FileForm.Text = lvi.Text
        Dim filename As String = tvDir.SelectedNode.FullPath + "\" + lvFiles.SelectedItems(0).Text
        Dim sr As StreamReader = New StreamReader(filename)
        Dim lines As ArrayList = New ArrayList()
        Do While (sr.Peek() <> -1)
            lines.Add(sr.ReadLine())
        Loop
        FileForm.txtContent.Lines = lines.ToArray(Type.GetType("System.String"))
        sr.Close()
        FileForm.txtContent.Select(0, 0)
        FileForm.ShowDialog(Me) 
    End Sub

    Private Sub NewFile()
        Dim formFileName As InputFileName = New InputFileName()
        If formFileName.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK Then
            Dim filename As String = tvDir.SelectedNode.FullPath + "\" + formFileName.txtFileName.Text + ".txt"
            Dim sw As StreamWriter = New StreamWriter(filename)
            If (sw IsNot Nothing) Then
                sw.Write("")
                sw.Close()
                ListDirsAndFiles(tvDir.SelectedNode.FullPath)
            End If
        End If

    End Sub

    Private Sub DeleteFile()
        If (lvFiles.SelectedItems.Count <= 0) Then
            MessageBox.Show(Me, "Delete file", "File", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            Return
        End If
        Dim filename As String = tvDir.SelectedNode.FullPath + "\" + lvFiles.SelectedItems(0).Text
        If (lvFiles.SelectedItems(0).ImageIndex = 3) Then
            MessageBox.Show(Me, "Not a file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            Return
        Else
            File.Delete(filename)
        End If
        ListDirsAndFiles(tvDir.SelectedNode.FullPath)
    End Sub

    Private Sub NewDirectory()
        Dim formdir As InputFileName = New InputFileName()
        formdir.Text = "Name"
        formdir.label1.Text = "Name"
        If (formdir.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
            Directory.CreateDirectory(tvDir.SelectedNode.FullPath + "\" + formdir.txtFileName.Text)
            tvDir.SelectedNode.Nodes.Add(New TreeNode(formdir.txtFileName.Text, 3, 4))
        End If
    End Sub

    Private Sub DeleteDirectory()
        If (MessageBox.Show(Me, "Delete it" + tvDir.SelectedNode.FullPath, "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) = System.Windows.Forms.DialogResult.OK) Then
            Directory.Delete(tvDir.SelectedNode.FullPath, True)
            tvDir.SelectedNode.Remove()
        End If
    End Sub

    Private Sub ChangeListViewMode(ByVal newview As View)
        miLargeIcon.Checked = False
        miSmallIcon.Checked = False
        miList.Checked = False
        miDetail.Checked = False
        tsbLargeIcon.Checked = False
        tsbSmallIcon.Checked = False
        tsbList.Checked = False
        tsbDetail.Checked = False
        Select Case newview
            Case View.LargeIcon
                lvFiles.View = View.LargeIcon
                tsbLargeIcon.Checked = True
                miLargeIcon.Checked = True
            Case View.SmallIcon
                lvFiles.View = View.SmallIcon
                tsbSmallIcon.Checked = True
                miSmallIcon.Checked = True
            Case View.List
                lvFiles.View = View.List
                tsbList.Checked = True
                miList.Checked = True
            Case Else
                lvFiles.View = View.Details
                tsbDetail.Checked = True
                miDetail.Checked = True
        End Select
    End Sub


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        nDirLevel = 0       
        ListDrives()        
    End Sub

    Private Sub miNewFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miNewFile.Click, tsbNew.Click
        NewFile()
    End Sub

    Private Sub miDelFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miDelFile.Click, tsbDel.Click
        DeleteFile()
    End Sub

    Private Sub miOpenFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miOpenFile.Click, tsbOpen.Click
        OpenFile()
    End Sub

    Private Sub miExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miExit.Click
        Me.Close()
    End Sub

    Private Sub miNewDir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miNewDir.Click
        NewDirectory()
    End Sub

    Private Sub miDelDir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miDelDir.Click
        DeleteDirectory()
    End Sub

    Private Sub miLargeIcon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLargeIcon.Click, tsbLargeIcon.Click
        ChangeListViewMode(View.LargeIcon)
    End Sub

    Private Sub miSmallIcon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miSmallIcon.Click, tsbSmallIcon.Click
        ChangeListViewMode(View.SmallIcon)
    End Sub

    Private Sub miList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miList.Click, tsbList.Click
        ChangeListViewMode(View.List)
    End Sub

    Private Sub miDetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miDetail.Click, tsbDetail.Click
        ChangeListViewMode(View.Details)
    End Sub

    Private Sub tvDir_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvDir.AfterSelect
        Dim callerfree As Long = 0
        Dim disksize As Long = 0
        Dim freespace As Long = 0
        txtPath.Text = tvDir.SelectedNode.FullPath
        ListDirsAndFiles(tvDir.SelectedNode.FullPath)
        GetDiskFreeSpaceEx(Path.GetPathRoot(tvDir.SelectedNode.FullPath), callerfree, disksize, freespace)
        freespace /= 1000000
        sb.Text = lvFiles.Items.Count.ToString() + freespace.ToString() + "MB"
    End Sub

    Private Sub lvFiles_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lvFiles.DoubleClick
        Dim lvi As ListViewItem = lvFiles.SelectedItems(0)
        If (lvi.ImageIndex = 3) Then
            Dim tn As TreeNode = tvDir.SelectedNode
            Dim i As Integer
            For i = 0 To tn.Nodes.Count - 1
                If (String.Compare(tn.Nodes(i).Text, lvi.Text) = 0) Then
                    tvDir.SelectedNode = tn.Nodes(i)
                End If
            Next i
            Return
        End If
        OpenFile()
    End Sub
End Class


<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MainForm
    Inherits System.Windows.Forms.Form

    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    Private components As System.ComponentModel.IContainer

    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.sb = New System.Windows.Forms.ToolStripStatusLabel
        Me.statusStrip1 = New System.Windows.Forms.StatusStrip
        Me.txtPath = New System.Windows.Forms.TextBox
        Me.panel1 = New System.Windows.Forms.Panel
        Me.label1 = New System.Windows.Forms.Label
        Me.tsbDetail = New System.Windows.Forms.ToolStripButton
        Me.tsbSmallIcon = New System.Windows.Forms.ToolStripButton
        Me.tsbLargeIcon = New System.Windows.Forms.ToolStripButton
        Me.toolStrip1 = New System.Windows.Forms.ToolStrip
        Me.tsbNew = New System.Windows.Forms.ToolStripButton
        Me.tsbOpen = New System.Windows.Forms.ToolStripButton
        Me.tsbDel = New System.Windows.Forms.ToolStripButton
        Me.tsbList = New System.Windows.Forms.ToolStripButton
        Me.panel2 = New System.Windows.Forms.Panel
        Me.splitter1 = New System.Windows.Forms.Splitter
        Me.lvFiles = New System.Windows.Forms.ListView
        Me.chName = New System.Windows.Forms.ColumnHeader
        Me.chSize = New System.Windows.Forms.ColumnHeader
        Me.chType = New System.Windows.Forms.ColumnHeader
        Me.chTime = New System.Windows.Forms.ColumnHeader
        Me.imgListView = New System.Windows.Forms.ImageList(Me.components)
        Me.tvDir = New System.Windows.Forms.TreeView
        Me.miExit = New System.Windows.Forms.ToolStripMenuItem
        Me.miSep = New System.Windows.Forms.ToolStripSeparator
        Me.miNewDir = New System.Windows.Forms.ToolStripMenuItem
        Me.miDir = New System.Windows.Forms.ToolStripMenuItem
        Me.miDelDir = New System.Windows.Forms.ToolStripMenuItem
        Me.miDelFile = New System.Windows.Forms.ToolStripMenuItem
        Me.miFile = New System.Windows.Forms.ToolStripMenuItem
        Me.miNewFile = New System.Windows.Forms.ToolStripMenuItem
        Me.miOpenFile = New System.Windows.Forms.ToolStripMenuItem
        Me.menuStrip1 = New System.Windows.Forms.MenuStrip
        Me.miView = New System.Windows.Forms.ToolStripMenuItem
        Me.miLargeIcon = New System.Windows.Forms.ToolStripMenuItem
        Me.miSmallIcon = New System.Windows.Forms.ToolStripMenuItem
        Me.miList = New System.Windows.Forms.ToolStripMenuItem
        Me.miDetail = New System.Windows.Forms.ToolStripMenuItem
        Me.statusStrip1.SuspendLayout()
        Me.panel1.SuspendLayout()
        Me.toolStrip1.SuspendLayout()
        Me.panel2.SuspendLayout()
        Me.menuStrip1.SuspendLayout()
        Me.SuspendLayout()
        '
        'sb
        '
        Me.sb.Name = "sb"
        Me.sb.Size = New System.Drawing.Size(175, 17)
        Me.sb.Text = "toolStripStatusLabel1"
        '
        'statusStrip1
        '
        Me.statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.sb})
        Me.statusStrip1.Location = New System.Drawing.Point(0, 454)
        Me.statusStrip1.Name = "statusStrip1"
        Me.statusStrip1.Size = New System.Drawing.Size(659, 22)
        Me.statusStrip1.TabIndex = 13
        Me.statusStrip1.Text = "statusStrip1"
        '
        'txtPath
        '
        Me.txtPath.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtPath.Location = New System.Drawing.Point(64, 0)
        Me.txtPath.Name = "txtPath"
        Me.txtPath.Size = New System.Drawing.Size(595, 25)
        Me.txtPath.TabIndex = 1
        '
        'panel1
        '
        Me.panel1.Controls.Add(Me.txtPath)
        Me.panel1.Controls.Add(Me.label1)
        Me.panel1.Dock = System.Windows.Forms.DockStyle.Top
        Me.panel1.Location = New System.Drawing.Point(0, 49)
        Me.panel1.Name = "panel1"
        Me.panel1.Size = New System.Drawing.Size(659, 29)
        Me.panel1.TabIndex = 14
        '
        'label1
        '
        Me.label1.Dock = System.Windows.Forms.DockStyle.Left
        Me.label1.Location = New System.Drawing.Point(0, 0)
        Me.label1.Name = "label1"
        Me.label1.Size = New System.Drawing.Size(64, 29)
        Me.label1.TabIndex = 0
        Me.label1.Text = "Path:"
        Me.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'tsbDetail
        '
        Me.tsbDetail.Checked = True
        Me.tsbDetail.CheckState = System.Windows.Forms.CheckState.Checked
        Me.tsbDetail.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbDetail.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbDetail.Name = "tsbDetail"
        Me.tsbDetail.Size = New System.Drawing.Size(23, 22)
        Me.tsbDetail.Text = "toolStripButton7"
        '
        'tsbSmallIcon
        '
        Me.tsbSmallIcon.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbSmallIcon.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbSmallIcon.Name = "tsbSmallIcon"
        Me.tsbSmallIcon.Size = New System.Drawing.Size(23, 22)
        Me.tsbSmallIcon.Text = "toolStripButton5"
        '
        'tsbLargeIcon
        '
        Me.tsbLargeIcon.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbLargeIcon.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbLargeIcon.Name = "tsbLargeIcon"
        Me.tsbLargeIcon.Size = New System.Drawing.Size(23, 22)
        Me.tsbLargeIcon.Text = "toolStripButton4"
        '
        'toolStrip1
        '
        Me.toolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsbNew, Me.tsbOpen, Me.tsbDel, Me.tsbLargeIcon, Me.tsbSmallIcon, Me.tsbList, Me.tsbDetail})
        Me.toolStrip1.Location = New System.Drawing.Point(0, 24)
        Me.toolStrip1.Name = "toolStrip1"
        Me.toolStrip1.Size = New System.Drawing.Size(659, 25)
        Me.toolStrip1.TabIndex = 12
        Me.toolStrip1.Text = "toolStrip1"
        '
        'tsbNew
        '
        Me.tsbNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbNew.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbNew.Name = "tsbNew"
        Me.tsbNew.Size = New System.Drawing.Size(23, 22)
        Me.tsbNew.Text = "toolStripButton1"
        '
        'tsbOpen
        '
        Me.tsbOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbOpen.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbOpen.Name = "tsbOpen"
        Me.tsbOpen.Size = New System.Drawing.Size(23, 22)
        Me.tsbOpen.Text = "toolStripButton2"
        '
        'tsbDel
        '
        Me.tsbDel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbDel.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbDel.Name = "tsbDel"
        Me.tsbDel.Size = New System.Drawing.Size(23, 22)
        Me.tsbDel.Text = "toolStripButton3"
        '
        'tsbList
        '
        Me.tsbList.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        Me.tsbList.ImageTransparentColor = System.Drawing.Color.Silver
        Me.tsbList.Name = "tsbList"
        Me.tsbList.Size = New System.Drawing.Size(23, 22)
        Me.tsbList.Text = "toolStripButton6"
        '
        'panel2
        '
        Me.panel2.Controls.Add(Me.splitter1)
        Me.panel2.Controls.Add(Me.lvFiles)
        Me.panel2.Controls.Add(Me.tvDir)
        Me.panel2.Dock = System.Windows.Forms.DockStyle.Fill
        Me.panel2.Location = New System.Drawing.Point(0, 78)
        Me.panel2.Name = "panel2"
        Me.panel2.Size = New System.Drawing.Size(659, 398)
        Me.panel2.TabIndex = 15
        '
        'splitter1
        '
        Me.splitter1.Location = New System.Drawing.Point(201, 0)
        Me.splitter1.Name = "splitter1"
        Me.splitter1.Size = New System.Drawing.Size(3, 398)
        Me.splitter1.TabIndex = 5
        Me.splitter1.TabStop = False
        '
        'lvFiles
        '
        Me.lvFiles.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.chName, Me.chSize, Me.chType, Me.chTime})
        Me.lvFiles.Dock = System.Windows.Forms.DockStyle.Fill
        Me.lvFiles.LargeImageList = Me.imgListView
        Me.lvFiles.Location = New System.Drawing.Point(201, 0)
        Me.lvFiles.Name = "lvFiles"
        Me.lvFiles.Size = New System.Drawing.Size(458, 398)
        Me.lvFiles.SmallImageList = Me.imgListView
        Me.lvFiles.StateImageList = Me.imgListView
        Me.lvFiles.TabIndex = 4
        Me.lvFiles.UseCompatibleStateImageBehavior = False
        '
        'chName
        '
        Me.chName.Text = "Name"
        Me.chName.Width = 200
        '
        'chSize
        '
        Me.chSize.Text = "Size"
        Me.chSize.Width = 100
        '
        'chType
        '
        Me.chType.Text = "Type"
        Me.chType.Width = 120
        '
        'chTime
        '
        Me.chTime.Text = "Date"
        Me.chTime.Width = 200
        '
        'tvDir
        '
        Me.tvDir.Dock = System.Windows.Forms.DockStyle.Left
        Me.tvDir.Location = New System.Drawing.Point(0, 0)
        Me.tvDir.Name = "tvDir"
        Me.tvDir.Size = New System.Drawing.Size(201, 398)
        Me.tvDir.TabIndex = 3
        '
        'miExit
        '
        Me.miExit.Name = "miExit"
        Me.miExit.Size = New System.Drawing.Size(128, 22)
        Me.miExit.Text = "Exit"
        '
        'miSep
        '
        Me.miSep.Name = "miSep"
        Me.miSep.Size = New System.Drawing.Size(125, 6)
        '
        'miNewDir
        '
        Me.miNewDir.Name = "miNewDir"
        Me.miNewDir.Size = New System.Drawing.Size(128, 22)
        Me.miNewDir.Text = "New(&N)"
        '
        'miDir
        '
        Me.miDir.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.miNewDir, Me.miDelDir})
        Me.miDir.Name = "miDir"
        Me.miDir.Size = New System.Drawing.Size(73, 20)
        Me.miDir.Text = "Dir(&D)"
        '
        'miDelDir
        '
        Me.miDelDir.Name = "miDelDir"
        Me.miDelDir.Size = New System.Drawing.Size(128, 22)
        Me.miDelDir.Text = "Delete(&D)"
        '
        'miDelFile
        '
        Me.miDelFile.Name = "miDelFile"
        Me.miDelFile.Size = New System.Drawing.Size(128, 22)
        Me.miDelFile.Text = "Delete(&D)"
        '
        'miFile
        '
        Me.miFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.miNewFile, Me.miOpenFile, Me.miDelFile, Me.miSep, Me.miExit})
        Me.miFile.Name = "miFile"
        Me.miFile.Size = New System.Drawing.Size(73, 20)
        Me.miFile.Text = "File(&F)"
        '
        'miNewFile
        '
        Me.miNewFile.Name = "miNewFile"
        Me.miNewFile.Size = New System.Drawing.Size(128, 22)
        Me.miNewFile.Text = "New(&N)"
        '
        'miOpenFile
        '
        Me.miOpenFile.Name = "miOpenFile"
        Me.miOpenFile.Size = New System.Drawing.Size(128, 22)
        Me.miOpenFile.Text = "Open(&O)"
        '
        'menuStrip1
        '
        Me.menuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.miFile, Me.miDir, Me.miView})
        Me.menuStrip1.Location = New System.Drawing.Point(0, 0)
        Me.menuStrip1.Name = "menuStrip1"
        Me.menuStrip1.Size = New System.Drawing.Size(659, 24)
        Me.menuStrip1.TabIndex = 11
        Me.menuStrip1.Text = "menuStrip1"
        '
        'miView
        '
        Me.miView.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.miLargeIcon, Me.miSmallIcon, Me.miList, Me.miDetail})
        Me.miView.Name = "miView"
        Me.miView.Size = New System.Drawing.Size(73, 20)
        Me.miView.Text = "View(&V)"
        '
        'miLargeIcon
        '
        Me.miLargeIcon.Name = "miLargeIcon"
        Me.miLargeIcon.Size = New System.Drawing.Size(158, 22)
        Me.miLargeIcon.Text = "Large Icon(&L)"
        '
        'miSmallIcon
        '
        Me.miSmallIcon.Name = "miSmallIcon"
        Me.miSmallIcon.Size = New System.Drawing.Size(158, 22)
        Me.miSmallIcon.Text = "Small Icon(&S)"
        '
        'miList
        '
        Me.miList.Name = "miList"
        Me.miList.Size = New System.Drawing.Size(158, 22)
        Me.miList.Text = "List(&L)"
        '
        'miDetail
        '
        Me.miDetail.Name = "miDetail"
        Me.miDetail.Size = New System.Drawing.Size(158, 22)
        Me.miDetail.Text = "Detail(&D)"
        '
        'MainForm
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(659, 476)
        Me.Controls.Add(Me.statusStrip1)
        Me.Controls.Add(Me.panel2)
        Me.Controls.Add(Me.panel1)
        Me.Controls.Add(Me.toolStrip1)
        Me.Controls.Add(Me.menuStrip1)
        Me.statusStrip1.ResumeLayout(False)
        Me.statusStrip1.PerformLayout()
        Me.panel1.ResumeLayout(False)
        Me.panel1.PerformLayout()
        Me.toolStrip1.ResumeLayout(False)
        Me.toolStrip1.PerformLayout()
        Me.panel2.ResumeLayout(False)
        Me.menuStrip1.ResumeLayout(False)
        Me.menuStrip1.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Private WithEvents sb As System.Windows.Forms.ToolStripStatusLabel
    Private WithEvents statusStrip1 As System.Windows.Forms.StatusStrip
    Private WithEvents txtPath As System.Windows.Forms.TextBox
    Private WithEvents panel1 As System.Windows.Forms.Panel
    Private WithEvents label1 As System.Windows.Forms.Label
    Private WithEvents tsbDetail As System.Windows.Forms.ToolStripButton
    Private WithEvents tsbSmallIcon As System.Windows.Forms.ToolStripButton
    Private WithEvents tsbLargeIcon As System.Windows.Forms.ToolStripButton
    Private WithEvents toolStrip1 As System.Windows.Forms.ToolStrip
    Private WithEvents tsbNew As System.Windows.Forms.ToolStripButton
    Private WithEvents tsbOpen As System.Windows.Forms.ToolStripButton
    Private WithEvents tsbDel As System.Windows.Forms.ToolStripButton
    Private WithEvents tsbList As System.Windows.Forms.ToolStripButton
    Private WithEvents panel2 As System.Windows.Forms.Panel
  &nb