VB5 to Pic VB5 Help


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    153


    Did you find this post helpful? Yes | No

    Default vb5 to pic

    Quote Originally Posted by rsocor01 View Post
    It stays on one line. Remember you are changing the caption of the label object.

    Robert

    Robert No I don't understand what your saying changing the caption Im lost
    I want byte1 byte2 and byte3 on one line, then the next line down the same thing this is serial data so byte1-3 are different values on each line, there just being used for formatting a string value so the layout is simple and easy.

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by l_gaminde View Post
    Robert No I don't understand what your saying changing the caption Im lost
    I want byte1 byte2 and byte3 on one line, then the next line down the same thing this is serial data so byte1-3 are different values on each line, there just being used for formatting a string value so the layout is simple and easy.
    l_gaminde,

    For a Label, do the following,

    Set the Multiline property of the label object to true. Also, make the scrollbars visible if you want to. End your command line with & vbcrlf like in the code that you posted

    Code:
    label1.Caption = byte1 & byte2 & byte3 & vbcrlf
    For a Textbox, do the following,
    • Set Multiline to true
    • Set ReadOnly to true
    • Write your code like the following
    Code:
    textbox1.text = byte1 & byte2 & byte3 & VbCrLf             'This is the first line
    textbox1.AppendText(byte1 & byte2 & byte3 & VbCrLf)   'These are the following lines
    I'm not in front of my personal PC, so I haven't tested this code but it should work. Let me know if you have problems.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    153


    Did you find this post helpful? Yes | No

    Default vb5

    Quote Originally Posted by rsocor01 View Post
    l_gaminde,

    For a Label, do the following,

    Set the Multiline property of the label object to true. Also, make the scrollbars visible if you want to. End your command line with & vbcrlf like in the code that you posted

    Code:
    label1.Caption = byte1 & byte2 & byte3 & vbcrlf
    For a Textbox, do the following,
    • Set Multiline to true
    • Set ReadOnly to true
    • Write your code like the following
    Code:
    textbox1.text = byte1 & byte2 & byte3 & VbCrLf             'This is the first line
    textbox1.AppendText(byte1 & byte2 & byte3 & VbCrLf)   'These are the following lines
    I'm not in front of my personal PC, so I haven't tested this code but it should work. Let me know if you have problems.

    Robert
    ok the first one doesn't work, thats what I have been wondering about it sits on line one and changes per each set of inputs and never drops down vbcrlf chr(10) or 13 nothing works on the end of the line ?? works in the middle like your test but not at the end.
    I will try the append thing now it will not read the first line textbox1.text again because I may have 30 to 100 or more lines to download

  4. #4
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    153


    Did you find this post helpful? Yes | No

    Default vb5

    Quote Originally Posted by rsocor01 View Post
    l_gaminde,

    For a Label, do the following,

    Set the Multiline property of the label object to true. Also, make the scrollbars visible if you want to. End your command line with & vbcrlf like in the code that you posted

    Code:
    label1.Caption = byte1 & byte2 & byte3 & vbcrlf
    For a Textbox, do the following,
    • Set Multiline to true
    • Set ReadOnly to true
    • Write your code like the following
    Code:
    textbox1.text = byte1 & byte2 & byte3 & VbCrLf             'This is the first line
    textbox1.AppendText(byte1 & byte2 & byte3 & VbCrLf)   'These are the following lines
    I'm not in front of my personal PC, so I haven't tested this code but it should work. Let me know if you have problems.

    Robert
    Ok i tried the second part and it will not compile method or data member not found
    and thats the Appendtext

  5. #5
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    153


    Did you find this post helpful? Yes | No

    Default vb5

    Quote Originally Posted by rsocor01 View Post
    l_gaminde,

    For a Label, do the following,

    Set the Multiline property of the label object to true. Also, make the scrollbars visible if you want to. End your command line with & vbcrlf like in the code that you posted

    Code:
    label1.Caption = byte1 & byte2 & byte3 & vbcrlf
    For a Textbox, do the following,
    • Set Multiline to true
    • Set ReadOnly to true
    • Write your code like the following
    Code:
    textbox1.text = byte1 & byte2 & byte3 & VbCrLf             'This is the first line
    textbox1.AppendText(byte1 & byte2 & byte3 & VbCrLf)   'These are the following lines
    I'm not in front of my personal PC, so I haven't tested this code but it should work. Let me know if you have problems.

    Robert
    one more thing I have changed the byte1 -3 and its now mystr which is all formatted

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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