Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Adding lines of texts


Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2006, 12:30 AM
jpamps jpamps is offline
Newcomer
 
Join Date: Nov 2006
Posts: 3
Default Adding lines of texts


hey guys,

how do i add lines of texts in a textbox then do a carriage return?

in other words, i have textbox1 and textbox2. when the user types something in textbox1 and press a button, it appears in textbox2. when the user does it again, the text(whatever the user inputs) appears under the first text in textbox2.
i have multiline set to true.

thanks
Reply With Quote
  #2  
Old 11-18-2006, 12:33 AM
MikeJ's Avatar
MikeJ MikeJ is offline
Retread

Retired Moderator
* Expert *
 
Join Date: Sep 2002
Location: Austin, Texas
Posts: 6,742
Default

Use the ampersand (the & character) to attach two string variables:
Code:
'The ampersand (&) denotes string concatenation Text2.Text = SomeString & SomeOtherString
Just curious, what version of VB are you using?
__________________
{ Lex Fori } { Locus Classicus } { Rutilus Scrinium }
Osculare pultem meam!
Reply With Quote
  #3  
Old 11-18-2006, 12:58 AM
jpamps jpamps is offline
Newcomer
 
Join Date: Nov 2006
Posts: 3
Default

Quote:
Originally Posted by MikeJ
Use the ampersand (the & character) to attach two string variables:
Code:
'The ampersand (&) denotes string concatenation Text2.Text = SomeString & SomeOtherString
Just curious, what version of VB are you using?
i'm using VB6. thanks... but i dont understand. sorry. i'm new to vb.
Reply With Quote
  #4  
Old 11-18-2006, 01:12 AM
MikeJ's Avatar
MikeJ MikeJ is offline
Retread

Retired Moderator
* Expert *
 
Join Date: Sep 2002
Location: Austin, Texas
Posts: 6,742
Default

Actually, it's way too late in the evening, I've missed something. The carriage return character in VB is vbCrLf. So, you would want to do:
Code:
'Should stick another line underneath the ones already there Text2.Text = Text2.Text & vbCrLf & Text1.Text
__________________
{ Lex Fori } { Locus Classicus } { Rutilus Scrinium }
Osculare pultem meam!
Reply With Quote
  #5  
Old 11-18-2006, 01:30 AM
jpamps jpamps is offline
Newcomer
 
Join Date: Nov 2006
Posts: 3
Default

Quote:
Originally Posted by MikeJ
Actually, it's way too late in the evening, I've missed something. The carriage return character in VB is vbCrLf. So, you would want to do:
Code:
'Should stick another line underneath the ones already there Text2.Text = Text2.Text & vbCrLf & Text1.Text
AWESOME!!! thanks man! works great!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->