Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Displays a dialog box containing a prompt. Waits for the user to enter text, and accept or cancel the dialog.

Returns the contents of the text box.

 

Syntax

 

s = InputBox$([hParent,] Prompt [, Title [, DefaultText [, Pass]] ] )

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

hParent

Numeric

Yes

Handle of parent window

Prompt

String

No

String to be used as user prompt

Title

String

Yes

Title of the input box dialog

DefaultText

String

Yes

Default text to be defaulted into input textbox

Pass

Numeric

Yes

%TRUE or %FALSE.

If %TRUE, display an asterisk (*) for each character typed into the control in order to obscure the password

 

Remarks

 

Restrictions

 

See also

 

Examples

 

Thanks to Mark_D for the following script example

Dim s               As String Value = ""

Dim Prompt          As String Value = "Enter Some thing here"

Dim Title           As String Value = "InputBox Example"                  '---Optional, can be left out

Dim DefaultText     As String Value = "press keyboard keys to change me"  '---Optional, can be left out

Dim sMsg            As String Value = ""

 

'---Assign the variable 's' to what is entered in the INPUTBOX

s = InputBox$(Prompt ,Title, DefaultText)

 

'---Prepare the 'sMsg' variable 

sMsg  = "     You entered: " & $CRLF

sMsg += s & $CRLF

 

'---Display a MessageBox to show what the user entered in the INPUTBOX 

MsgBox 0, sMsg

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software