CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 16

Hybrid View

  1. #1
    Join Date
    May 2014
    Posts
    16

    Missing VB6 dirlistbox - an old issue but not for me

    I see MS has really worked at developing animosity by killing the dirlistbox with the replacement they deem better but it is far from useful for my simple application. My users are going to revolt when my .net application roll out with their new GUI.

    I have been scouring the internet for some useable code that will give me a working dirlistbox but with no luck. There does seem to be an army of really pi$##d of people trying to do the same thing. I aggressively love change but the old listing works for my users and my particular needs quite nice. I am currently trying to learn VB.net and am stuck on the cusp of understanding how to use and call classes at the moment.

    Can someone point me to an nice little example that will work in vb.net express 2010. I found some things to buy but they only seem to be for the professional version.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Missing VB6 dirlistbox - an old issue but not for me

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    thanks d,

    I will try it out but don't know if this will give me access to sub-folders like the old dirlistbox did.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Missing VB6 dirlistbox - an old issue but not for me

    Quote Originally Posted by Tesla View Post
    thanks d,

    I will try it out but don't know if this will give me access to sub-folders like the old dirlistbox did.
    Of course it will. The FolderBrowserDialog is based on the Windows SHBrowseForFolder api starting in Windows XP. Do you believe that for the past 13 years folks haven't had the ability to access sub-folders?

    As far as animosity, Microsoft obviously doesn't intend to piss folks off, but they need to move in a direction they see fit. I remember when I first moved to C# from C++ around the 2003 timeframe - it was tough because there wasn't really any guides to transition from native code to managed code. At the time, it was said that one of the reasons for lack of guides were that MS wanted to devs to wrap their heads around the new way of doing things, rather than attempting to structure the code the old way.

    Back it 2003, it was tough to transition because not everything available natively had a corresponding .net class. Now-a-days most everything has a .net class so it's rare when you have to break out and pinvoke like you had to in the old days.

  5. #5
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    I am currently using the FolderBrowswerDialog but the old controls worked much nicer for my purpose. I understand Microsoft must choose its own direction but they could use a new GPS in my opinion anyway (bad windows 8 experience). I really don't think keeping the old controls around would have been a show stopper for them but maybe that's incorrect given my lack of actual training in coding.

    Alas, I burned too much time trying to simulate the old control so the users will just have to deal with the new GUI.

    thanks for your help.
    Last edited by Tesla; June 3rd, 2014 at 03:40 PM.

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Missing VB6 dirlistbox - an old issue but not for me

    Quote Originally Posted by Tesla View Post
    I really don't think keeping the old controls around would have been a show stopper for them but maybe that's incorrect given my lack of actual training in coding.
    It might not seem so, but if you keep the old code around, then someone has to maintain it. As new OS's come out, it becomes more difficult to bring old code up to the standards and security demands of the newer OS. Remember most of the older code bases were written in a more trusting age so at some point, it's more cost effective to retire the code base rather than trying to shoehorn fixes in to keep it working.

  7. #7
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    Name:  vb-interface.jpg
Views: 1435
Size:  73.2 KB

  8. #8
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    I found this code but it has a lot of errors. Added. Even without the errors this is too complex for me to even work with. i am going to take my VB6 to VB.net kick in the $## and try and move on.

    http://code.msdn.microsoft.com/windo...stBox-4c5a9ac0
    Last edited by Tesla; June 10th, 2014 at 02:53 PM.

  9. #9
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Missing VB6 dirlistbox - an old issue but not for me

    Out of curiosity, once you display the files what do you do? Do you allow the user to select one or more files?

  10. #10
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    The user can select a file or all files for mass text editing.

    It converts instructions for CNC machines to run on a controller with a different format.

  11. #11
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Missing VB6 dirlistbox - an old issue but not for me

    Quote Originally Posted by Tesla View Post
    The user can select a file or all files for mass text editing.

    It converts instructions for CNC machines to run on a controller with a different format.
    Okay. Maybe this is too late, but have you checked out the OpenFileDialog with the Multiselect property set?

    You would then use the FileNames property to retrieve the full path to the selected files. See the FileNames property for sample VB code.

  12. #12
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    thanks for the help. I don't have an issue doing what is required at the file level. It is quickly moving through various directories and subdirectories that is lost to process various files.

  13. #13
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Missing VB6 dirlistbox - an old issue but not for me

    Okay. Help me understand. Does the user select the individual files (in multiple sub directories) or do you want the user to select the top level directory and then you programmatically retrieve files under that directory (and sub-directories)?

  14. #14
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    As for the files, the user may choose to process them one at a time or use a separate "process all" button. A multi-select would be useful occasionally but if there are more than a couple of programs to process the operators just reprocess them all.

    They may need to do work in several directories such as

    C:\myfiles\subdirA
    c:\myfiles\subdirB

    and may need to process some files within those directories as this example shows.

    C:\myfiles\subdirA\temp1
    C:\myfiles\subdirA\temp2

    I can't really hard-code out my options due to the existence of various levels of sub-directories. It was very seamless/convenient to move through the structure as it was but having to go into the new GUI to process every separate file or files is going to create some frustration for my users.

    Truthfully, it even makes testing my code a painful experience. I will probably consider coding out data selection for my next vb6 to vb.net project and open it up when complete.

  15. #15
    Join Date
    May 2014
    Posts
    16

    Re: Missing VB6 dirlistbox - an old issue but not for me

    After trying the demo, I bought this add-on to get my menu back. It works well so far. I did not wait out the demo as it was a bit "naggy". If anyone knows of a forum for this third party software please pass it on. thanks.


    http://www.ssware.com/megapack.htm
    Last edited by Tesla; July 11th, 2014 at 10:01 AM.

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

Featured