Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Folder Browser Dialog

Folder Browser Dialog

Scheduled Pinned Locked Moved C#
csharpjsonquestion
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Itanium
    wrote on last edited by
    #1

    Hi All! How can we get the 'Folder Browser Dialog' like ,we have have standard 'file open dialog'. Is there any component in .net providing this capability? or is there some APi, we have to use in order to open a folder browser dialog.? Thanx in Advance :) sorry for my bad English.

    A H 2 Replies Last reply
    0
    • I Itanium

      Hi All! How can we get the 'Folder Browser Dialog' like ,we have have standard 'file open dialog'. Is there any component in .net providing this capability? or is there some APi, we have to use in order to open a folder browser dialog.? Thanx in Advance :) sorry for my bad English.

      A Offline
      A Offline
      aneye
      wrote on last edited by
      #2

      try this one, it have some limited. Add System.Design into References. Use method ShowDialog() to show using System; using System.Windows.Forms; using System.Windows.Forms.Design; namespace WindowsApplication1 { /// /// this provides the BrowseFolderDialog for browse folders. /// public class BrowseFolderDialog : FolderNameEditor { FolderNameEditor.FolderBrowser fBrowser; public BrowseFolderDialog() { fBrowser = new FolderNameEditor.FolderBrowser(); } public string DirectoryPath { get {return fBrowser.DirectoryPath;} } public DialogResult ShowDialog(string txtDescription) { // set the Description label fBrowser.Description = txtDescription; fBrowser.StartLocation = FolderBrowserFolder.MyDocuments; return fBrowser.ShowDialog(); } ~BrowseFolderDialog() { // destructor fBrowser.Dispose(); } } }

      1 Reply Last reply
      0
      • I Itanium

        Hi All! How can we get the 'Folder Browser Dialog' like ,we have have standard 'file open dialog'. Is there any component in .net providing this capability? or is there some APi, we have to use in order to open a folder browser dialog.? Thanx in Advance :) sorry for my bad English.

        H Offline
        H Offline
        Heath Stewart
        wrote on last edited by
        #3

        There is System.Windows.Forms.FolderBrowserDialog in .NET 1.1 and up. For applications targeting .NET 1.0, you'll have to create a look-alike or encapsulate the SHBrowserForFolder API. There are several articles here on the CodeProejct site that discuss the latter option. The component I mentioned first is very easy to use, just like the OpenFileDialog and SaveFileDialog components.

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups