I did get it to work finally. What I did wasn't too different than what I was trying before, but here is how I did it.
- I created two text boxes from the .cs [Design] view.
- I selected each box and clicked the "Events" lightning bolt icon under Properties. This is something I left out previously when this didn't work.
- I set both of them to KeyPress and TextChanged (i.e. textBox1_KeyPress & textBox1_TextChanged (Did the same thing with textBox2). I don't know if this is part of the reason why it worked. I'm just documenting my actions.
- I double clicked each textBox, which created an EventArgs for each. This is where I stored my regular code.
- In addition to the EventArgs I manually created a KeyEventArgs (see below) where I put the function for the Backspace. Here is the code:
// Here is the KeyEventArgs I created using KeyPress (Public).
public void textBox2_KeyPress(object sender, KeyEventArgs e)
{ if (e.KeyCode == Keys.Back && textBox2.Text.Length == 0) textBox1.Focus(); } // Here is where the rest of my code (Private).
private void textBox2_TextChanged(object sender, EventArgs e)
{ if (textBox2.Text == "A") richTextBox3.Text = "January"; if (textBox2.Text == "B") richTextBox3.Text = "February"; if (textBox2.Text == "C") richTextBox3.Text = "March"; // Code Continues...
Sorry if this isn't clear. I just wanted to document what I did in case it helps someone later. Thanks for the help everyone.