Directory / File Manager

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts Page 1 of 1
Contributors
User avatar
bjm0008
Dedicated Member
Dedicated Member
Posts: 69
Joined: Thu Aug 13, 2009 2:35 am

Directory / File Manager
bjm0008
I was attempting to create a file and directory browser, I spent hours on it, problem after problem.
I literally abandoned the project to test some code snippets. When I realized that there are more than the default form tools such as mediaplayer, I felt stupid.



http://www.mediafire.com/file/5hynifou5 ... plorer.zip
Directory Explorer.zip
http://www.mediafire.com/file/5hynifou5 ... plorer.zip



To access these other tools follow these instructions:

1. Right click on any tool (I'm rightclicking on textbox)

Image

2.A. Click "Choose Items" and wait for box to appear (may take at most 10minutes)
B. Type in "Listbox"

Image

3. Check off 'FileListBox' and 'DirListBox'

4.The New Tools are now ready for use.
Image

What the form should look like:

Image
Code: Select all
Imports System.IO
Public Class Form1
    Dim ProStrt As String

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        FileListBox1.Path = DirListBox1.Path
        DIRToolStripMenuItem.Text = DirListBox1.Path & "\" & FileListBox1.SelectedItem
        ProStrt = DirListBox1.Path & "\" & FileListBox1.SelectedItem
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.MinimumSize = Me.Size
        Timer1.Enabled = True
        TextBox1.Enabled = False
        Button1.Enabled = False
    End Sub

    Private Sub FileListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles FileListBox1.DoubleClick
        Process.Start(ProStrt)
    End Sub

    Private Sub AddDirectoryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddDirectoryToolStripMenuItem.Click
        TextBox1.Enabled = True
        Button1.Enabled = True
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MkDir(DirListBox1.Path & "\" & TextBox1.Text)
        TextBox1.Enabled = False
        Button1.Enabled = False
    End Sub

    Private Sub RemoveDirectoryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemoveDirectoryToolStripMenuItem.Click
        FileListBox1.Path = ("C:\users\" & Environment.UserName & "\")
        System.IO.Directory.Delete(DirListBox1.Path & "\" & DirListBox1.SelectedItem)
        DirListBox1.Path = (DirListBox1.Path)
        MsgBox("Directory Deleted," & vbNewLine & "along with any files and subfolders." & vbNewLine & "please reload directory to see results.")
    End Sub
End Class

Directory Explorer.zip
Directory Explorer.zip
Directory Explorer.zip
http://www.mediafire.com/file/5hynifou5 ... plorer.zip
You do not have the required permissions to view the files attached to this post.
Image
User avatar
XTechVB
VIP - Site Partner
VIP - Site Partner
Posts: 727
Joined: Thu May 20, 2010 10:32 am

Re: Directory / File Manager
XTechVB
nice thanks!!!!
You can find me on Facebook or on Skype mihai_92b
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Directory / File Manager
zachman61
thanks i made it so they can click the directory to open it up but the create and textbox will not turn on
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
bjm0008
Dedicated Member
Dedicated Member
Posts: 69
Joined: Thu Aug 13, 2009 2:35 am

Re: Directory / File Manager
bjm0008
zachman61 wrote:
thanks i made it so they can click the directory to open it up but the create and textbox will not turn on
Thanks for the feedback, sorry I must have excluded this part from the post.
When a docked item is visible it sets its order so its 'topmost'. To fix that just undock ALL items and select textbox and button, on the tool bar ubove click format>Order>Bring To front. Re-Dock The items ( to same places )
Image
Now you should be fine :)
Image
User avatar
Moayad
Just Registered
Just Registered
Posts: 8
Joined: Tue Jul 13, 2010 5:14 am

Re: Directory / File Manager
Moayad
i like this keep it up
User avatar
un kn0 wn
VIP - Donator
VIP - Donator
Posts: 269
Joined: Mon Mar 29, 2010 6:12 pm

Re: Directory / File Manager
un kn0 wn
nice but why have u added 3 attachments?
User avatar
codenstuffplanet
Just Registered
Just Registered
Posts: 5
Joined: Thu Jul 22, 2010 2:58 am

Someone could transform this into an antivirus.
7 posts Page 1 of 1
Return to “Tutorials”