Porting old VB5 to C# problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nodoid
    New Member
    • May 2010
    • 19

    Porting old VB5 to C# problem

    Hi,

    I have an old VB5 app which I'd like to bring over to .NET. Most of the code is simple enough to port, but the designer is using what looks to be either an old COM or MFC widget to display directories in a drop down with a tree view under it and then a list of files under that.

    I can do the list of files (not that hard really), but the tree view and treeview filer thing I'm not to sure on.

    I've attached a file to this posting so you can see what I'm trying to replicate. It looks pretty much like an open file dialog, but not as a dialog.

    Any help or advice would be useful
    Attached Files
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I remember that dialog from VB... it seems there's no C# equivalent, which is kind of silly if you ask me.

    Anyway, you should be able to make one yourself. Make a custom control and look at using a TreeView and the classes available to you in System.IO, such as Path and DirectoryInfo.

    Another option would be to use a 3rd party control. I did some googling around and found Shell Megapack which may work for you. Make sure you scan for viruses! I've never used this before so I don't know how safe the link is. It looks fine, but you never know.

    Good luck!

    Comment

    • nodoid
      New Member
      • May 2010
      • 19

      #3
      Looked at that and it may do the job. I think it'll be easier to update the UI and use the correct tools for the job rather than keeping to the old layout... After all, those nice people at MS wouldn't have given us the save and open file dialogs if there wasn't a reason for them ;-)

      Thanks for the reply :-)

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        True, the FolderBrowserDi alog is pretty good, but I think it's a total oversight that they didn't include it as a control also.

        I can't help but feel like making your own folder (and possibly file) browsing control would be worth the effort. I'd imagine you can find ways to use that again in the future ;)

        Either way, whatever works best for you.

        Comment

        Working...