\r\n & rtf files

P

Patrick de Ridder

When transferring the contents of a textBox (not a rich textBox)
to the Microsoft email client I lose all the "\r\n". Consequently the
email becomes one long string. With what can I replace all the
\r\n so that returns+new_lines are inserted? Presumably more
is needed.

Alternatively, is there a conversion option to change
plain text in rtf text?

It would be too much work to change the textBox into a rich
text box.

Many thanks,
Patrick.
 
C

cody

When transferring the contents of a textBox (not a rich textBox)
to the Microsoft email client I lose all the "\r\n". Consequently the
email becomes one long string. With what can I replace all the
\r\n so that returns+new_lines are inserted? Presumably more
is needed.

Alternatively, is there a conversion option to change
plain text in rtf text?

It would be too much work to change the textBox into a rich
text box.


If you transfer an email using plain text /r/n should be preserved. If
sending as html, use <br> tags to indicate a new line.
To convert text into rtf:

rtb = new RichTextBox();
rtb.Text = myText;
string myRtf = rtb.Rtf;
 
P

Patrick de Ridder

If ... I do
rtb = new RichTextBox();
rtb.Text = textBox1.Text;
string myRtf = rtb.Rtf;
and pass myRtf to the outlook express
then ... nothing is passed.

If .... I select plain text in outlook express
and pass textBox1.Text
then... all \r\n are non operative.

If I replace \r\n by x, then xs are printed where ther should be line
breaks,
so outlook express is not responding to the line breaks.

Patrick.
 
P

Patrick de Ridder

If in outlook express I use control+m I get a line break

if I send (char)13 in the text instead of \r\n nothing happens

how can that be?

Patrick.
 
P

Patrick de Ridder

My problem remains: how do I send text
ASCII or rtf to outlook express whilst
preserving line breaks?

Whatever I try, I cannot get it to work.

(If in outlook express I use control+m I get a line break
if I send (char)13 in the text instead of \r\n nothing happens
how can that be?)

Patrick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top