_INPUTBOX$
Jump to navigation
Jump to search
The _INPUTBOX$ function displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box. The returned string is an empty string ("") if the user cancelled.
Syntax
- result$ = _INPUTBOX$(title$, message$[, defaultInput$])
Parameters
- title$ is the dialog box title
- message$ is the message or prompt that will is displayed in the dialog box
- defaultInput$ is a string that is displayed in the text box as the default response if no other input is provided
Description
- All parameters accept an empty string ("") in which case system defaults are used
- Use message$ to specify instructions to the user
- The dialog box automatically becomes a modal window if the application window is visible
Availability
- QB64-PE v3.4 and up
Examples
- Example
- Hello, world with common dialogs
username$ = _INPUTBOX$("Hello App", "Enter your name:", "anonymous") IF username$ <> "" THEN _MESSAGEBOX "Hello App", "Hello " + username$, "info" |
See also
- _NOTIFYPOPUP
- _MESSAGEBOX
- _MESSAGEBOX (function)
- _SELECTFOLDERDIALOG$
- _OPENFILEDIALOG$
- _SAVEFILEDIALOG$