System.Shell.chooseFolder Method
Displays a folder picker dialog box and retrieves a System.Shell.Item object that represents the selected folder.
Syntax
oSystemShellItem = System.Shell.chooseFolder(
strTitle,
intOptions
)
Parameters
- strTitle [in]
String Sets String that specifies the title for the folder picker dialog box. - intOptions [in]
int Sets Integer that specifies the folder picker dialog box options. Note The only supported value is zero (0); effectively no options. - oSystemShellItem [out]
Object A System.Shell.Item that represents the selected folder.
Return Value
HRESULT
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The root directory is set to the path for the users profile (%USERPROFILE%).
The chooseFolder dialog box:
Examples
The following example shows how to display the folder picker dialog box.
// Create a shell item object.
var oSystemShellItem = System.Shell.chooseFolder("SDK Choose Folder Example", 0);
Requirements
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
IDL | Sidebar.idl |
DLL | Sidebar.Exe version 1.00 or later |
See Also
Send comments about this topic to Microsoft
Build date: 2/24/2010
Build type: SDK