日期:2014-05-18 浏览次数:20962 次
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == ';')
e.KeyChar = Convert.ToChar( 13);
}
------解决方案--------------------
textBox1.Text = textBox1.Text.Replace(@";", "\r\n");
------解决方案--------------------
在输入的时候就要转换推荐用1楼的方法
在输入后保存或则做其他的事情的时候要转换推荐2楼的方法