Results 1 to 3 of 3

Thread: [RESOLVED] Set Initial dir in Browseforfolder Dialog

  1. #1

    Thread Starter
    Lively Member stevebriz's Avatar
    Join Date
    Jul 2006
    Location
    Santiago,Chile
    Posts
    95

    Resolved [RESOLVED] Set Initial dir in Browseforfolder Dialog

    hi all,
    I seem to be stuck on setting the initial dir In Vb2005.net when using the browsefor older dialog.
    I see the rootfolder but I want to set the initial folder to a specific location:
    eg: "c:\ mytestfolder" not root or anything like my docs etc.
    any help with this would eb much appreciated.

    thanks
    Steve

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Set Initial dir in Browseforfolder Dialog

    Root folder is only to specify the very top root of the dialog window. This is handy when you want to lets say limit the folder they select to only a specific place (maybe my documents). Setting the root folder to My Documents disallows the user to select something outside my documents, because they can only drill up as far as the root folder you specify.

    Now the actual property you want to use, is SelectedPath.

    SelectedPath serves 2 rolls (its technically one roll, but you could look at is as 2). If you set it before showing the dialog, it will be the folder selected by default when the dialog is shown. It also is the variable that will hold the actual selected folder after the dialog is closed.

  3. #3

    Thread Starter
    Lively Member stevebriz's Avatar
    Join Date
    Jul 2006
    Location
    Santiago,Chile
    Posts
    95

    Re: Set Initial dir in Browseforfolder Dialog

    Great stuff.. that did the trick...thanks for the detailed explanation!

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