Example #1
0
 private void textBox1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Up) //Keys.Up is the Upper Arrow
     {
         UpTimer1.Start();
     }
 }
Example #2
0
 private void UpTimer1_Tick(object sender, EventArgs e)
 {
     // THERE MUST BE SOME DELAY BECAUSE IT WILL RUN THE "SET UP CURSOR"
     // FIRST BEFORE THE UPPER KEY IS REGISTERED IN THE TEXTBOX
     // ---- Set the cursor at the last letter ----
     textBox1.SelectionStart  = textBox1.Text.Length;
     textBox1.SelectionLength = 0;
     // -------------------------------------------
     UpTimer1.Stop();
 }