BFF$ function

Purpose:

BFF$ opens a dialog box in which the user can browse for, and choose a directory. The BFF$ function returns a string containing the full path and directory name chosen by the user.

Syntax:

RetStr$ = BFF$(Instructions AS STRING  _
                 [, BIF_Flags AS UINT] _
          [, Startdirectory AS STRING])

Return Value:

  • Data type: STRING
    RetStr The full path and directory name specified by the user.

Parameters:

  • Data type: STRING
    Instructions Instructions to the user displayed above the tree view control in the dialog box.
  • BIF_Flags [OPTIONAL] BROWSEINFO structure flags specifying the options for the dialog box. The arguments for this parameter can include zero or a combination of the values in the following list.
    • BIF_RETURNONLYFSDIRS
    • BIF_DONTGOBELOWDOMAIN
    • BIF_STATUSTEXT
    • BIF_RETURNFSANCESTORS
    • BIF_EDITBOX
    • BIF_VALIDATE
    • BIF_NEWDIALOGSTYLE
    • BIF_USENEWUI
    • BIF_BROWSEINCLUDEURLS
    • BIF_UAHINT
    • BIF_NONEWdirectoryBUTTON
    • BIF_NOTRANSLATETARGETS
    • BIF_BROWSEFORCOMPUTER
    • BIF_BROWSEFORPRINTER
    • BIF_BROWSEINCLUDEFILES
    • BIF_SHAREABLE
    • BIF_BROWSEFILEJUNCTIONS
    • Detailed information available at the Microsoft BROWSEINFOA structure webpage.
  • Data type: STRING
    Startdirectory [OPTIONAL] The name of the directory in which the dialog box will open.

Example:

This example uses BIF_BROWSEINCLUDEFILES as a BIF_Flags parameter argument

DIM RetStr$
DIM Caption$

Caption$ = "Pick a file or directory"
RetStr$ = BFF$(Caption$, BIF_BROWSEINCLUDEFILES)
PRINT RetStr$