Results 1 to 11 of 11

Thread: Browse For Folder Is Better In VB6 Than In VB.NET

Threaded View

  1. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Browse For Folder Is Better In VB6 Than In VB.NET

    Personally I've never liked the "FolderBrowserDialog" both in vb6 & in .Net, luckily since switching to .Net and the introduction of Windows Vista there's an api that will display a "OpenFolderDialog" which operates very similar to the OpenFileDialog and SaveFileDialog and is much more suited, in my opinion, than the FolderBrowserDialog ever could be:
    Name:  OpenFolderDialog.jpg
Views: 2017
Size:  30.3 KB

    I've uploaded the class that makes that happen, but using it is as simple as:
    vb Code:
    1. Using ofd As New OpenFolderDialog With {.DefaultFolder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop), .InitialFolder = .DefaultFolder}
    2.     If ofd.ShowDialog(Me) <> DialogResult.Cancel Then
    3.         'Use ofd.Folder for the path to the selected folder
    4.     End If
    5. End Using
    Last edited by JuggaloBrotha; Jan 30th, 2015 at 12:14 PM.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

Tags for this Thread

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