Results 1 to 3 of 3

Thread: INPUTBOX example

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    4
    Rep Power
    0

    INPUTBOX example

    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.

    [code=thinbasic]' 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 [/code]

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,818
    Rep Power
    10

    Re: INPUTBOX example

    Thanks. I will add in Help file.

    _________________________________________________
    A little note on posting code in forum. This forum implements a color syntax method called
    Geshi
    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
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    Junior Member
    Join Date
    Aug 2008
    Posts
    4
    Rep Power
    0

    Re: INPUTBOX example

    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

Similar Threads

  1. using INPUTBOX$
    By sandyrepope in forum Core module
    Replies: 3
    Last Post: 11-05-2007, 12:57

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •