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

Thread: Replacement for FileListBox? [VB 2005]

  1. #1
    Join Date
    Nov 2006
    Posts
    20

    Replacement for FileListBox? [VB 2005]

    Hi,

    I am adding some simple folder/file browsing functionality to my app. I found the old versions that have been added to VB 2005 for compatiblitly, and, well, they are ugly.

    I am looking for something that looks a little more like windows explorer, works with UNC's (\\networkPCName or addy) and is easy to implement. Can somebody please point me in the correct direction?

    Thanks for your time,
    Cutha

  2. #2
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,892

    Arrow Re: Replacement for FileListBox? [VB 2005]

    I'm assuming that you are talking about embedding these controls directly in to your form. There is nothing "built-in", but there are some 3rd party controls out there if you don't want to create it yourself.

    The GotDotNet powerpack has something you can use:
    http://msdn.microsoft.com/library/en...bpowerpack.asp

    If you're talking about a separate dialog window with this functionality, then there are new controls already available for that in >= .NET 2.0.
    Last edited by Craig Gemmill; November 27th, 2006 at 09:03 PM.
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 08/2015 = .NET 4.x and Visual Studio 2015
    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow all threads, so if you have a secondary question, message me.

  3. #3
    Join Date
    Jan 2006
    Posts
    293

    Re: Replacement for FileListBox? [VB 2005]

    You mentioned how you were using the older compatibility VB6 dialogs, have you tried the regular common dialog classes included in VB.NET? Not sure what the VB6 ones looked like...
    Code:
            'browsing folders
            Dim FolderBrowser As New FolderBrowserDialog
            If FolderBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
                MessageBox.Show(FolderBrowser.SelectedPath)
            End If
    
            'browsing files
            Dim FileBrowser As New OpenFileDialog
            If FileBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
                MessageBox.Show(FileBrowser.FileName)
            End If
    Of course those are general examples there are several properties you can set for each to change up title, description, file filters, etc etc

  4. #4
    Join Date
    Nov 2006
    Posts
    20

    Re: Replacement for FileListBox? [VB 2005]

    Bang On, you assumed correctly. I think that is exactly what I am looking for.

    It's funny how the post seems so clear in my head, until somebody replies. I need to work on that.

    Quote Originally Posted by Craig Gemmill
    I'm assuming that you are talking about embedding these controls directly in to your form. There is nothing "built-in", but there are some 3rd party controls out there if you don't want to create it yourself.

    The GotDotNet powerpack has something you can use:
    http://msdn.microsoft.com/library/en...bpowerpack.asp

    If you're talking about a separate dialog window with this functionality, then there are new controls already available for that in >= .NET 2.0.

  5. #5
    Join Date
    Nov 2006
    Posts
    20

    Re: Replacement for FileListBox? [VB 2005]

    Sorry I was not more clear. I am not looking for a dialog box, but something that will be embedded in a form. I found a few examples last night, but the few I found that looked ok were terribly slow in large directories.

    Thanks though.

    Quote Originally Posted by gigemboy
    You mentioned how you were using the older compatibility VB6 dialogs, have you tried the regular common dialog classes included in VB.NET? Not sure what the VB6 ones looked like...
    Code:
            'browsing folders
            Dim FolderBrowser As New FolderBrowserDialog
            If FolderBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
                MessageBox.Show(FolderBrowser.SelectedPath)
            End If
    
            'browsing files
            Dim FileBrowser As New OpenFileDialog
            If FileBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
                MessageBox.Show(FileBrowser.FileName)
            End If
    Of course those are general examples there are several properties you can set for each to change up title, description, file filters, etc etc

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)