Common Dialog for Folder Browser


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Common Dialog for Folder Browser

  1. #1
    David Chu Guest

    Common Dialog for Folder Browser


    I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    works great, except that I could not figure out how I can initialize a path
    for the window just like MS CommonDialog Control(you may set InitDir to set
    initial path for FileOpen/Save).

    I would like to remember the previously selected folder in case the browser
    is opened again for viewing or making changes. Is there another way to bring
    up a FolderBrowser window with initialized path? I could easily create a
    Usercontrol to do that, but I would not like to invent my wheel.

    David Chu

  2. #2
    Robert Gelb Guest

    Re: Common Dialog for Folder Browser

    Read the FAQ at www.mvps.org/ccrp


    --
    Robert Gelb
    www.vbRad.com
    Source Code, Tips, Tricks, Components


    "David Chu" <david.chu@sage.nelesautomation.com> wrote in message
    news:3ae88880$1@news.devx.com...
    >
    > I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    > works great, except that I could not figure out how I can initialize a

    path
    > for the window just like MS CommonDialog Control(you may set InitDir to

    set
    > initial path for FileOpen/Save).
    >
    > I would like to remember the previously selected folder in case the

    browser
    > is opened again for viewing or making changes. Is there another way to

    bring
    > up a FolderBrowser window with initialized path? I could easily create a
    > Usercontrol to do that, but I would not like to invent my wheel.
    >
    > David Chu




  3. #3
    Robert Gelb Guest

    Re: Common Dialog for Folder Browser

    Read the FAQ at www.mvps.org/ccrp


    --
    Robert Gelb
    www.vbRad.com
    Source Code, Tips, Tricks, Components


    "David Chu" <david.chu@sage.nelesautomation.com> wrote in message
    news:3ae88880$1@news.devx.com...
    >
    > I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    > works great, except that I could not figure out how I can initialize a

    path
    > for the window just like MS CommonDialog Control(you may set InitDir to

    set
    > initial path for FileOpen/Save).
    >
    > I would like to remember the previously selected folder in case the

    browser
    > is opened again for viewing or making changes. Is there another way to

    bring
    > up a FolderBrowser window with initialized path? I could easily create a
    > Usercontrol to do that, but I would not like to invent my wheel.
    >
    > David Chu




  4. #4
    Randy Birch Guest

    Re: Common Dialog for Folder Browser

    See http://www.mvps.org/vbnet/code/callb...secallback.htm




    --

    Randy Birch
    MVP Visual Basic

    http://www.mvps.org/vbnet/

    Please respond only to the newsgroups so all can benefit.



    "David Chu" <david.chu@sage.nelesautomation.com> wrote in message
    news:3ae88880$1@news.devx.com...
    :
    : I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    : works great, except that I could not figure out how I can initialize a
    path
    : for the window just like MS CommonDialog Control(you may set InitDir to
    set
    : initial path for FileOpen/Save).
    :
    : I would like to remember the previously selected folder in case the
    browser
    : is opened again for viewing or making changes. Is there another way to
    bring
    : up a FolderBrowser window with initialized path? I could easily create a
    : Usercontrol to do that, but I would not like to invent my wheel.
    :
    : David Chu



  5. #5
    Randy Birch Guest

    Re: Common Dialog for Folder Browser

    See http://www.mvps.org/vbnet/code/callb...secallback.htm




    --

    Randy Birch
    MVP Visual Basic

    http://www.mvps.org/vbnet/

    Please respond only to the newsgroups so all can benefit.



    "David Chu" <david.chu@sage.nelesautomation.com> wrote in message
    news:3ae88880$1@news.devx.com...
    :
    : I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    : works great, except that I could not figure out how I can initialize a
    path
    : for the window just like MS CommonDialog Control(you may set InitDir to
    set
    : initial path for FileOpen/Save).
    :
    : I would like to remember the previously selected folder in case the
    browser
    : is opened again for viewing or making changes. Is there another way to
    bring
    : up a FolderBrowser window with initialized path? I could easily create a
    : Usercontrol to do that, but I would not like to invent my wheel.
    :
    : David Chu



  6. #6
    Larry Rebich Guest

    Re: Common Dialog for Folder Browser

    David,

    Some months ago I wrote a tip of the month that I call 'Get Available Space
    and Encapsulated Browse for Folder'. Link to
    http://www.buygold.net/tips.html then look for the January 2001 tip of the
    month. A sample program is provided. The intro to the tip:

    Periodically there are requests in the news groups for functions that return
    available disk space. I 'dusted off' some code I wrote some time ago, added
    support for 'large' drives and while I was at it encapsulated 'Browse for
    Folder' code that was written by Randy Birch and others. Randy's web site:
    http://www.mvps.org/vbnet/index.html

    Cheers,
    Larry Rebich

    More tips link to:
    http://www.buygold.net/tips.html

    Please:
    No personal e-mail questions :-)


    "David Chu" <david.chu@sage.nelesautomation.com> wrote in message
    news:3ae88880$1@news.devx.com...
    >
    > I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    > works great, except that I could not figure out how I can initialize a

    path
    > for the window just like MS CommonDialog Control(you may set InitDir to

    set
    > initial path for FileOpen/Save).
    >
    > I would like to remember the previously selected folder in case the

    browser
    > is opened again for viewing or making changes. Is there another way to

    bring
    > up a FolderBrowser window with initialized path? I could easily create a
    > Usercontrol to do that, but I would not like to invent my wheel.
    >
    > David Chu




  7. #7
    Larry Rebich Guest

    Re: Common Dialog for Folder Browser

    David,

    Some months ago I wrote a tip of the month that I call 'Get Available Space
    and Encapsulated Browse for Folder'. Link to
    http://www.buygold.net/tips.html then look for the January 2001 tip of the
    month. A sample program is provided. The intro to the tip:

    Periodically there are requests in the news groups for functions that return
    available disk space. I 'dusted off' some code I wrote some time ago, added
    support for 'large' drives and while I was at it encapsulated 'Browse for
    Folder' code that was written by Randy Birch and others. Randy's web site:
    http://www.mvps.org/vbnet/index.html

    Cheers,
    Larry Rebich

    More tips link to:
    http://www.buygold.net/tips.html

    Please:
    No personal e-mail questions :-)


    "David Chu" <david.chu@sage.nelesautomation.com> wrote in message
    news:3ae88880$1@news.devx.com...
    >
    > I used API SHBrowseForFolder() to pop up a FolderBrowser dialog window. It
    > works great, except that I could not figure out how I can initialize a

    path
    > for the window just like MS CommonDialog Control(you may set InitDir to

    set
    > initial path for FileOpen/Save).
    >
    > I would like to remember the previously selected folder in case the

    browser
    > is opened again for viewing or making changes. Is there another way to

    bring
    > up a FolderBrowser window with initialized path? I could easily create a
    > Usercontrol to do that, but I would not like to invent my wheel.
    >
    > David Chu




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center