|
08-03-2008
There's two ways.
(You should be using a Rich Text Box in the first place BTW)
Newline characters are \n, \r\n, or the preferred Environment.Newline.
Why Environment.Newline? Some localizations use the \n and \r\n combo's as something other than the new line character. Environment.Newline is aware of the current localization and changes the newline character accordingly.
So the full code would be simple.
richTextBox1.AppendText("your string" & Environment.Newline)
You could also substitute it out for:
richTextBox1.AppendText("your string \n")
But that's not recommended.
On a side note before people complain about my \r\n statement.
\r is usually a carriage return, and \n is a line feed. (CRLF if any of you have seen the acronym) Some older OS's require the \r\n, others only require \n. Either way, Environment.Newline solves you having to worry about it at all. VB skills is an oxymoron. - Cypher |