PDA

View Full Version : INPUTBOX example



Mark_D
11-08-2008, 00:18
Ok - I know its pretty easy to grasp with out a sample, but because I am playing around, and I already made it - I figured 'might as well put it in the help file' and make thinbasic a just a little more 'noob' friendly. :D


' InputBoxExample.tbasic
' ----------------------

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

ErosOlmi
11-08-2008, 07:34
Thanks. I will add in Help file.

_________________________________________________
A little note on posting code in forum. This forum implements a color syntax method called
Geshi (http://qbnz.com/highlighter/) developed by Nigel McNie.

It is very easy to use. Just after the word "Code" present in brackets, add a "=" sign followed by "thinbasic" or other supported language. Another way is to use the "Syntax Highlight (geShi)" combobox present just above the posting text area.

Ciao
Eros

Mark_D
11-08-2008, 17:49
Ah - I think I recall the combo box with the geShi - I wasn't curious enough to see all its options - I will keep this in mind next time... Thanks.

ps. looks like you already edited my post - thanks again.

Mark