Results 1 to 8 of 8

Thread: Problems using DirectoryListBox and DriveListBox

  1. #1

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464

    Problems using DirectoryListBox and DriveListBox

    Ok, I know I shouldn't be using these, but they were easy and fast and there.

    Here are the declarations:
    Code:
    private Microsoft.VisualBasic.Compatibility.VB6.DirListBox dirListBox;
    private Microsoft.VisualBasic.Compatibility.VB6.DriveListBox driveListBox;
    Using these controls on my computer is no problem. When I sent the beta of my project to my friend that has just the framework installed, he gets an error when the form loads that has these controls on it.

    So here is what I am wondering. Do I need to send out some additional files with my project to make these work? Or does anyone have any code that can help me get rid of these controls all together? I think I would perfer a different way if any of you have one.

  2. #2
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    I haven't used the VB6 compatability stuff, but it wouldn't surprise me if they relied upon the VB6 runtime, msvbvm60.dll.

    I saw something on this, but I can't get over to c-sharpcorner.com right now. I think the server's down again. You might need to modify the list view / tree view / combo box controls to simulate the dir and file list box functionality.
    -scott
    he he he

  3. #3

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Thanks, I can't get over to C# corner either.

    I found some VB.Net code on Planet Source Code that looks like it will work. I am going to port that over to C#, and if it works, I will post it here so others can use it.

    I have a book that has code to fill a treeview up with directories, which is what I need, but I keep getting errors because I am trying to associate icons with the directories and such. Like I said, when I get a solution, I will post it here for all.

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    Adding "DriveListBox","DirListBox", and "FileListBox" to VS.NET Toolbox:

    Right Click "Toolbox"
    select "Customize Toolbox"
    Select the ".NET Framework Component" tab
    Select the "DriveListBox","DirListBox", and "FileListBox" checkboxes and hit OK
    Now you can drag and drop the "DriveListBox","DirListBox", and "FileListBox" into the Windows Form.

  5. #5

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    That is what I was using, but they seem to cause errors on my friends computer, even though there is no errors on my computer. All he did was do the windows update and got the framework, so I am kind of relying on his computer to help me debug the app on a computer that doesn't have VS6 and VS.Net installed.

    I have now ported over some VB code I found at Planet Source Code. I have included the app here. It is actually pretty good for browsing folders. Didn't even know some of this stuff was in the .Net framework. I customized it a little to fit my needs.

    I forgot to include the original authors name of the VB version which is Chris Merrill. You can find the VB version he wrote here:
    http://www.planet-source-code.com/vb...=328&lngWId=10
    Attached Files Attached Files
    Last edited by hellswraith; Oct 23rd, 2002 at 03:06 PM.

  6. #6

  7. #7
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    c-sharpcorner example (one of many)
    -scott
    he he he

  8. #8

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Check out the one I did, I think you will agree that it is a whole lot better than the ones that are on C-Sharp Corner.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width