Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. private void richTextBox1_KeyPress(object sender, KeyPressEventArgs e)
  2. {
  3. if (e.KeyChar == 13)
  4. {
  5. richTextBox2.Clear();
  6. string texto = richTextBox1.Text;
  7. string[] linhas = texto.Split('n');
  8. foreach (string linha in linhas)
  9. {
  10. richTextBox2.AppendText(linha + Environment.NewLine);
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement