|
-
Feb 7th, 2007, 12:47 PM
#1
Thread Starter
Lively Member
[RESOLVED] NextLine in Text1.Text ?
Hello,
I know this is really a newbie question , 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.
-
Feb 7th, 2007, 12:50 PM
#2
Re: NextLine in Text1.Text ?
VB Code:
Text1.Text=TextString & vbcrlf & Text1.Text
Please mark you thread resolved using the Thread Tools as shown
-
Feb 7th, 2007, 12:50 PM
#3
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
-
Feb 7th, 2007, 12:55 PM
#4
Thread Starter
Lively Member
Re: NextLine in Text1.Text ?
YES
Thank you BOTH for the FAST and GOOD reply , it works 
Best Regards,
Didier
Last edited by DRI66; Feb 7th, 2007 at 01:00 PM.
-
Feb 7th, 2007, 12:56 PM
#5
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
Please mark you thread resolved using the Thread Tools as shown
-
Feb 7th, 2007, 01:01 PM
#6
Thread Starter
Lively Member
Re: NextLine in Text1.Text ?
THANK YOU ALL 
 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|