C#让TextBox滚动条一直位于最下部
滚动条自动处于TextBox最下部需要在Form1类中加上下段代码:
private void txtReceiveMsgChanged(object sender, EventArgs e)
{
//文本框选中的起始点在最后
txtReceiveMsg.SelectionStart = txtReceiveMsg.TextLength;
//将控件内容滚动到当前插入符号位置
txtReceiveMsg.ScrollToCaret();
}