cObject
---cSelectFolderDialog
cSelectFolderDialog allows users to choose a file in Windows. It permits users to select an existing folder, or create a new folder to select (by right-clicking in the dialog and selecting New >Folder from the context menu).
OpenDialog allows selecting of a file instead of a folder.
This sample shows how to retrieve a user-selected folder from a cSelectFolderDialog. The dialog's initial location is set to "C:\".
Use cSelectFolderDialog.pkg Object oSelectFolderButton is a Button Set Location to 4 187 Set Label to 'Select a Folder' Procedure OnClick String sFolder Handle hoDialog // dynically create a cSelectFolderDialog object Get Create (RefClass(cSelectFolderDialog)) to hoDialog Get SelectFolder of hoDialog "Choose Folder" "C:\" to sFolder If (sFolder <> "") Send Info_Box sFolder Else Send Info_Box "No Folder Selected" // destroy the dialog object Send Destroy of hoDialog End_Procedure End_Object