Print User Directory Application. User selects drive and folder from combo box and the app creates a txt file with the selected contents

Posted on 2007-07-24
Last Modified: 2013-11-26
I am creating my first Visual Basic Windows Application. I am a mainframe programmer and my boss is wanting me to learn some VB. He has me creating an application in Visual Basic 2005 express that uses a combo box to display the users disk drives all mapped network drives and local host drives will be displayed. He want the user to select a file from one of the disk have it's contents put into a TXT file. He also wants the user to be able to sort the output file before creating it. He wants the user to select the sort via radio buttons. The user can select sort by Name, Size, Date, and Extension. I also have a text box at the bottom of the form that generates the output file path and when the user clicks the go button the application creates the file. I have the design done I have no clue where to start on coding this thing. He let me take some beginner level online tutorials and I did the famous Hello World app which is very minor in comparison to what I am trying to do here.
Question by:vvandevender
    LVL 96

    Expert Comment

    by:Bob Learned
    What have you tried?  Where would you like to go?  How can we help without completely answering your question (so you can learn something)?


    Author Comment

    So far I have only tried google and I can't find what I am looking for. I have a combo box created and I have searched for some code to get me started but I can't find anything on google that was of any use. I have tried binding the combo box to a Directory Searcher Component but could not get that to work. I am not sure if that was the correct approach or not. I was just trying something b/c I have no idea..

    If I could get pointed in the right direction with some ideas that would be great. That way I could learn something like you said without being given the entire answer.

     The only thing is that I have a strict Pre designed form that I have to stick to. I have to have a combo box and I have to have a list box or some sort of box below it that displays the folders in the drives highlighted in the combo box.  I am sorry I am so clueless on this but like I said I am a mainframer and I am learning so bare with me here. I gotta get my feet wet sometime so I guess this is it.
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    So you select a drive from the combo, and then...

    Is the ListBox supposed to have just folders?...just files?...or folders and files?

    I ~think~ the "output" is supposed to be the file/folder listing of the currently selected drive in the whatever sort order is specified?

    Is the listing of just root files/folders?...or a recursive files/folders listing?

    Author Comment

    The list box should then display just the folders after you selected the drive from the combo box. The user should be able to select the folder in the list box and then the app will create the text file. The txt file should be composed of the contents inside the folder.

    The output file text box has a browse button beside it. It allows the user to browse through and select the folder on any mapped drive or local disk that the user has access to put the text file it creates. The text file (output file) it creates should contain the contents of the folder selected in the list box. Once the user selects the folder he/she wants to put the text file in. The user will then select the (GO.Button) and the text file is created.
    LVL 96

    Accepted Solution

    Interestingly enough, there are three VB6 compatability controls available with VB.NET that might be of some use (DriveListBox, DirListBox, and FileListBox).  They aren't available through the ToolBox by default, but you can add them, by right-clicking on the ToolBox, and selecting 'Add/Remove Items', and finding them on the .NET tab.


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now