BrowseForFolder Method (WINDOW)


9.1D, PLBCMP GUI Only

 

TThe BrowseForFolder method creates a dialog box that allows selection of a folder. The method uses the following format:

 

[label]

{object}.BrowseForFolder

[GIVING {return}] [USING [*Instructions=]{instr}]:

 

 

[[*CSIDLValue=]{csidlvalue}]:

 

 

[*BIFValue=]{bifvalue}[,*Path=]{path}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A WINDOW object that is accessed.

return

Optional. A Character String Variable that returns the folder selected.

instr

Required. A Character String Variable or literal that is displayed above the tree view control in the dialog box.

csidlvalue

Optional. A Numeric Variable or decimal number that provides a unique system-independent way to identify a special folder used as the root.

bifvalue

Optional. A Numeric Variable or decimal number that that provides control of the operations of the dialog box.

path

Optional. A Character String Variable or literal that contains a valid Windows PATH that initializes the directory for the browse dialog.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the {return} variable is too small to contain the string, the EOS Condition Flag is set.

  2. The OVER and ZERO Condition Flags are always cleared.

  3. If the end user cancels the browse folder dialog, the {return} variable is set to NULL.

  4. If there is an error executing the browse folder dialog, the {return} variable is set to NULL.

  5. For the Windows CE OS platforms, the browse folder functions are available for OS version 4.0 and later. If a Windows version does not support the BrowseForFolder functions, the method operation is ignored and the {return} variable is set to NULL.

  6. The appropriate values that can be used for the {csidlvalue} is specified as follows.

  7.  

    Constant

    Value

    Meaning

    CSIDL_DESKTOP

    0x0

    <desktop>

    CSIDL_INTERNET

    0x1

    Internet Explorer (icon)

    CSIDL_PROGRAMS

    0x2

    Start Menu\Programs

    CSIDL_CONTROLS

    0x3

    My Computer\Control Panel

    CSIDL_PRINTERS

    0x4

    My Computer\Printers

    CSIDL_PERSONAL

    0x5

    My Documents

    CSIDL_FAVORITES

    0x6

    <user name>\Favorites

    CSIDL_STARTUP

    0x7

    Start Menu\Programs\Start

    CSIDL_RECENT

    0x8

    <user name>\Recent

    CSIDL_SENDTO

    0x9

    <user name>\SendTo

    CSIDL_BITBUCKET

    0xa

    <desktop>\Recycle Bin

    CSIDL_STARTMENU

    0xb

    <user name>\Start Menu

    CSIDL_MYDOCUMENTS

    0xc

    logical "My Documents"

    CSIDL_MYMUSIC

    0xd

    "My Music" folder

    CSIDL_MYVIDEO

    0xe

    "My Videos" folder

    CSIDL_DESKTOPDIRECTORY

    0x10

    <user name>\Desktop

    CSIDL_DRIVES

    0x11

    My Computer

    CSIDL_NETWORK

    0x12

    Network Neighborhood (My Network Places)

    CSIDL_NETHOOD

    0x13

    <user name>\nethood

    CSIDL_FONTS

    0x14

    windows\fonts

    CSIDL_TEMPLATES

    0x15

     

    CSIDL_COMMON_STARTMENU

    0x16

    All Users\Start Menu

    CSIDL_COMMON_PROGRAMS

    0x17

    All Users\Start Menu\Programs

    CSIDL_COMMON_STARTUP

    0x18

    All Users\Startup

    CSIDL_COMMON_DESKTOPDIRECTORY

    0x19

    All Users\Desktop

    CSIDL_APPDATA

    0x1a

    <user name>\Application

    CSIDL_PRINTHOOD

    0x1b

    <user name>\PrintHood

    CSIDL_LOCAL_APPDATA

    0x1c

    <user name>\Local Settings\Application Data (non roaming)

    CSIDL_ALTSTARTUP

    0x1D

    non localized startup

    CSIDL_COMMON_ALTSTARTUP

    0x1E

    non localized common

    CSIDL_COMMON_FAVORITES

    0x1fF

     

    CSIDL_INTERNET_CACHE

    0x20

     

    CSIDL_COOKIES

    0x21

     

    CSIDL_HISTORY

    0x22

     

    CSIDL_COMMON_APPDATA

    0x23

    All Users\Application

    CSIDL_WINDOWS

    0x24

    GetWindowsDirectory()

    CSIDL_SYSTEM

    0x25

    GetSystemDirectory()

    CSIDL_PROGRAM_FILES

    0x26

    C:\Program Files

    CSIDL_MYPICTURES

    0x27

    C:\Program Files\My Pict

    CSIDL_PROFILE

    0x28

    USERPROFILE

    CSIDL_SYSTEMX86

    0x29

    x86 system directory

    CSIDL_PROGRAM_FILESX86

    0x2A

    x86 C:\Program Files

    CSIDL_PROGRAM_FILES_COMMON

    0x2B

    C:\Program Files\Common

    CSIDL_PROGRAM_FILES_COMMONX86

    0x2C

    x86 Program Files\Common

    CSIDL_COMMON_TEMPLATES

    0x2D

    All Users\Templates

    CSIDL_COMMON_DOCUMENTS

    0x2E

    All Users\Documents

    CSIDL_COMMON_ADMINTOOLS

    0x2F

    All Users\Start Menu\Programs\Administrative Tools

    CSIDL_ADMINTOOLS

    0x30

    <user name>\Start Menu\Programs\Administrative Tools

    CSIDL_CONNECTIONS

    0x31

    Network and Dial-up Connections

    CSIDL_COMMON_MUSIC

    0x35

    All Users\My Music

    CSIDL_COMMON_PICTURES

    0x36

    All Users\My Pictures

    CSIDL_COMMON_VIDEO

    0x37

    All Users\My Video

    CSIDL_RESOURCES

    0x38

    Resource Direcotry

    CSIDL_RESOURCES_LOCALIZED

    0x39

    Localized Resource Directories

    CSIDL_COMMON_OEM_LINKS

    0x3A

    Links to All Users OEM specific apps

    CSIDL_CDBURN_AREA

    0x3bB

    USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning

     

    0x3C

    Unused

    CSIDL_COMPUTERSNEARME

    0x3D

    Computers Near Me (computed from Workgroup membership)

    CSIDL_FLAG_CREATE

    0x8000

    combine with CSIDL_ value to force folder creation in SHGetFolderPath()

    CSIDL_FLAG_DONT_VERIFY

    0x4000

    combine with CSIDL_ value to return an unverified folder path

    CSIDL_FLAG_NO_ALIAS

    0x1000

    combine with CSIDL_ value to insure non-alias versions of the pidl

    CSIDL_FLAG_PER_USER_INIT

    0x800

    combine with CSIDL_ to indicate per-user init (e.g., upgrade)

    CSIDL_FLAG_MASK

    0xFF00

    mask for all possible flag values.

     

  8. The appropriate values that can be used for the {bifvalue} as follows:

  9.  

    Constant

    Value

    Meaning

    BIF_RETURNONLYFSDIRS

    0x1

    For finding a folder to start document searching

    BIF_DONTGOBELOWDOMAIN

    0x2

    For starting the Find Computer

     

    0x4

    Not Used

    BIF_RETURNFSANCESTORS

    0x8

    BIF_USENEWUI must be set. The browse dialog box displays shareable resources on remote systems. It is intended for applications that want to expose remote shares on a local system.

    BIF_EDITBOX

    0x10

    Add an editbox to the dialog

    BIF_VALIDATE

    0x20

    Insist on valid result (or CANCEL)

    BIF_NEWDIALOGSTYLE

    0x40

    Use the new dialog layout with the ability to resize.

    BIF_USENEWUI

    0x50

    BIF_NEWDIALOGSTYLE + BIF_EDITBOX

    BIF_BROWSEINCLUDEURLS

    0x80

    Allow URLs to be displayed or entered (requires BIF_USENEWUI)

    BIF_UAHINT

    0x100

    Add a UA hint to the dialog in place of the edit box. May not be combined with BIF_EDITBOX

    BIF_NONEWFOLDERBUTTON

    0x200

    Do not add the "New Folder" button to the dialog. Only applicable with BIF_NEWDIALOGSTYLE

    BIF_NOTRANSLATETARGETS

    0x400

    Don't traverse target as shortcut

    BIF_BROWSEFORCOMPUTER

    0x1000

    Browsing for Computers.

    BIF_BROWSEFORPRINTER

    0x2000

    Browsing for Printers

    BIF_BROWSEINCLUDEFILES

    0x4000

    Browsing for Everything

    BIF_SHAREABLE

    0x8000

    Sharable resources displayed (remote shares, requires BIF_USENEWUI)

     

  10. This method is not available when using the PL/B Web Server.

 

 

See Also: Method Syntax, WINDOW Methods

 



PL/B Language Reference BackGrndMouseMove Method (WINDOW) Close Method (WINDOW)