[RESOLVED] NextLine in Text1.Text ?
Hello,
I know this is really a newbie question :blush: , but I have tried several methods to have one line under the other line?
What I need is simple , when a string come in it will be put on the first line.
When the next string come in , it will be put on the next line , and so on.
But in the below script , the next line overwrite the first one :(
VB Code:
Private Sub Timer1_Timer()
Timer1.Enabled = False
Dim TextString
For i = 0 To (strInput(0) And &H1F)
TextString = TextString + Hex$(strInput(i)) + "H "
' Text1.Text = Text1.Text + Hex$(strInput(i)) + "H " & Chr$(13) + Chr$(10)
Next i
Text1.Text = TextString & Chr$(13) + Chr$(10)
End Sub
Thanks Again for your good help ;)
Best Regards,
Didier.
Re: NextLine in Text1.Text ?
VB Code:
Text1.Text=TextString & vbcrlf & Text1.Text
Re: NextLine in Text1.Text ?
The problem is that you are just giving it the new text, you need to put the previous text in too:
VB Code:
Text1.Text = [u]Text1.Text &[/u] TextString & vbNewLine
Re: NextLine in Text1.Text ?
YES :)
Thank you BOTH for the FAST and GOOD reply , it works ;)
Best Regards,
Didier
Re: NextLine in Text1.Text ?
VB Code:
Private Sub Timer1_Timer()
Timer1.Enabled = False
Dim TextString
For i = 0 To (strInput(0) And &H1F)
TextString = TextString + Hex$(strInput(i)) + "H "
Next i
[B] Text1.Text =Text1.Text & vbCrLf& TextString [/B]
End Sub
Re: NextLine in Text1.Text ?
THANK YOU ALL ;)
Quote:
Originally Posted by danasegarane
VB Code:
Private Sub Timer1_Timer()
Timer1.Enabled = False
Dim TextString
For i = 0 To (strInput(0) And &H1F)
TextString = TextString + Hex$(strInput(i)) + "H "
Next i
[B] Text1.Text =Text1.Text & vbCrLf& TextString [/B]
End Sub