serial i/o

Discussion in 'Questions (Windows Mobile)' started by Softselect, Jul 24, 2007.

  1. Softselect

    Softselect Member Licensed User

    Hi everyone,
    can someone help me to add a carrage return to the end of a string
    i tried
    if serial.PortOpen = true then TextBox1.Text = StrToUpper (TextBox1.Text & serial.InputString & Chr(13))
    but the device i am sending to doe not see the chr 13
    please help, i am new to basic4pc

    Thanks in advance
    Friedrich:sign0085:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The carriage return on the textbox control is actually Chr(13) & Chr(10) (or the other way around).
    You should use the CRLF contant instead:
    if serial.PortOpen = true then TextBox1.Text = StrToUpper (TextBox1.Text & serial.InputString & CRLF)
    BTW, did you set TextBox1.MultiLine = True ?
     
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