Empty lines in multi textbox

.netdev

Member
Joined
Jan 7, 2006
Messages
10
Programming Experience
Beginner
Dear jmcilhinney

i appologize for sending from two diferents users same kind of questions
it wasn't on purpose.I have two accounts and i use them with my friend which
it seemed that she asked same question as she didn't pay attention that i post it.

Forget my other question....

i have another thing to ask:
i have in my form a multi textbox and a command botton
when the button is clicked it makes some analyses and puts the info in the textbox

how i can insert blank lines in this multi text box.because later on i should send these information
in a text file.so i need empty lines....

can this be done??

Thanks again...i know that this forum is for help and sorry for any inconvience
you thought i made. I know well that this forum is not a game and common
sense should be used for sure....



,


 
There are a number of ways to represent a new line in VB.NET. You can use vbCRLf, ControlChars.CrLf, ControlChars.NewLine and Environment.NewLine. I would recommend using Environment.NewLine as it is the only one that has no dependency on the Microsoft.VisualBasic namespace. You definitely shouldn't use vbCrLf, which really only exists so that upgraded VB6 code won't break. The other two are more acceptable than vbCrLf but, in my opinion, less desirable than the last option.

Assuming you are using Environment.NewLine, you would add a new line to a TextBox like this:
VB.NET:
myTextBox.AppendText(Environment.NewLine)
If you want to add an empty line you simply do that twice.
 
Back
Top