SIP Input

Discussion in 'Questions (Windows Mobile)' started by leestevens, Aug 1, 2008.

  1. leestevens

    leestevens New Member Licensed User

    I'm still 'practicing' with Basic4PPC but its got me hooked. I do most coding on my device but being a VB.net and desktop convert, I have never needed to know much about SIP coding.

    I understand the SIP(True) and SIP(False) commands but what I am looking to do is to obtain input from the user via the SIP but not necessarily into a visible control such as a textbox.

    For example, if a question e.g. 3 + 5 = ? appears on screen, I want the user to be able to input 8, the label showing 3 + 5 = ? will change to 3 + 5 = 8 correct), scroll up and a new question appear. This I can take care of except for obtaining the users input (e.g. 8). The whole process will be timed so I do not want the user to have to tap a text box before using the SIP to enter their answer. I want the user to type/write the answer in the SIP and my program to grab the answer and do the work.

    Finally, my question, how do I grab the users input into, say, a variable ?

    Any help would be appreciated, sorry if there is an obvious answer!

    Lee Stevens :sign0104:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The easiest solution is to "hide" a textbox behind a panel or label and then use something like:
    Code:
    Sub App_Start
        Form1.Show
        textbox1.Focus
    End Sub

    Sub TextBox1_KeyPress (key)
        form1.Text = key 
    'handle the key press
        textbox1.Text = ""
    End Sub
     
  3. leestevens

    leestevens New Member Licensed User

    Thanks Erel,

    I will give the idea a try. I considered this method but was unsure whether the textbox would retain focus (with everything else going on!) - however thats the programmers job (to keep control of the controls).

    Thanks again for the reply and for the excellent software !!

    Lee Stevens
    (newbie++)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice