//store SelectionStart public int ise=0; //richTextBox1_TextChanged: ise = richTextBox1.SelectionStart;
//keydown private void richTextBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Left || e.KeyCode==Keys.Right) { ise = richTextBox1.SelectionStart; textBox1.Text = string.Format("select start:{0}", ise.ToString()); } if (e.KeyCode == Keys.Up) { ise = richTextBox1.SelectionStart; textBox1.Text = string.Format("select start:{0}", ise.ToString()); } if (e.KeyCode == Keys.Down) { ise = richTextBox1.SelectionStart; textBox1.Text = string.Format("select start:{0}", ise.ToString()); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)