-
Right, I just got vb on the weekend and i've been playing around with it.
I want to make a really basic chat program.
I'm using 2 text boxes on the form (text1 & text2)
The text I type into text2 gets copied into text1 with a username added to it.
Anyhow, the problem is, when I send the second sentence I end up with;
<catcalls>hello!<catcalls>why!?!?<catcalls> F**K THIS!!!
instead of;
<catcalls> Hi!
<catcalls> Finally,
<catcalls> It works...
Y'see, what i'm missing is NEW LINE
So, how do I make text1 go to a new line each time?
I want something I can tag on the end of
text1.text = text2.text + /n 'as the new line
I tried /n but it didnt work. What's the code for new line?
-
-
Ha ha ha ha.........
Well, after reading the Visual Basic FAQ I discovered
Text1.Text = Text1.Text + Text2.Text & Chr$(13) & Chr$(10)
But it seems Cander beat me to it with vbcrfl :)
Sweet,
big thanks
-
vbCr = Chr$(13)
vbLf = Chr$(10)
vbCrlf = Chr$(13) & Chr$(10)
Oh ya, there is a new line constant, vbNewLine
-
vbCrLf is the same thing.
-
vbNewLine is only avialable in VB5+, while vbCrLf is supported in earlier versions.