在richTextBox組件TextChanged事件上加上:
richTextBox1.Focus();
richTextBox1.Select(richTextBox1.Text.Length, 0);
richTextBox1.ScrollToCaret();
只要richTextBox有內容追加進來就會觸發滾動效果
在richTextBox組件TextChanged事件上加上:
richTextBox1.Focus();
richTextBox1.Select(richTextBox1.Text.Length, 0);
richTextBox1.ScrollToCaret();
只要richTextBox有內容追加進來就會觸發滾動效果
this.richTextBox2.SelectionStart=this.richTextBox2.Text.Length; this.richTextBox2.ScrollToCaret();
public partial class MyMessageBox : Window { public static void Show(string strErrorInfo) {