_SELECTFOLDERDIALOG$

From QB64 Phoenix Edition Wiki
Revision as of 18:13, 29 October 2022 by A740g (talk | contribs) (Initial version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The _SELECTFOLDERDIALOG$ function displays a dialog box that enables the user to select a folder (directory). The returned string is a folder path or an empty string ("") if the user cancelled.

Syntax

folder$ = _SELECTFOLDERDIALOG$(title$[, defaultPath$])


Parameters

  • title$ is the dialog box title
  • defaultPath$ is a string that is displayed above the folder tree view in the dialog box


Description

  • All parameters accept an empty string ("") in which case system defaults are used
  • Use the defaultPath$ to specify instructions to the user
  • The dialog box automatically becomes a modal window if the application window is visible
  • The folder selected must exist in the filesystem else an empty string is returned


Availability

  • QB64-PE v3.4 and up


Examples

Example
Folder selection
folder$ = _SELECTFOLDERDIALOG$("Select a folder to scan:")
IF folder$ <> "" THEN _MESSAGEBOX "Information", "You selected " + folder$


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link