Dialog.SelectDirectory (gb.form.dialog)

Static Function SelectDirectory ( ) As Boolean

Calls the file standard dialog to get an existing directory name.

Returns TRUE if the user clicked on the Cancel button, and FALSE if the user clicked on the OK button.

This example list all files in a directory selected by the user. If the user cancels the dialog then the list is not displayed.

Examples

Public Sub ButtonDirectory_Click()
  Dim fileName As String
  If Dialog.SelectDirectory() Then Return
  For Each fileName In Dir(Dialog.Path)
    Print Dialog.Path &/ fileName
  Next
End