|
-
Feb 7th, 2001, 01:41 PM
#1
Thread Starter
New Member
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?
-
Feb 7th, 2001, 01:42 PM
#2
-
Feb 7th, 2001, 02:19 PM
#3
Thread Starter
New Member
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
Last edited by catcalls; Feb 7th, 2001 at 02:22 PM.
-
Feb 7th, 2001, 02:20 PM
#4
PowerPoster
vbCr = Chr$(13)
vbLf = Chr$(10)
vbCrlf = Chr$(13) & Chr$(10)
Oh ya, there is a new line constant, vbNewLine
-
Feb 7th, 2001, 02:20 PM
#5
vbCrLf is the same thing.
-
Feb 7th, 2001, 03:13 PM
#6
vbNewLine is only avialable in VB5+, while vbCrLf is supported in earlier versions.
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
|