How to Handle TextBox Click Out Event

May 7 2012 2:37 AM

Hi,

I have a very simple app which is changing a panel backcolor by user input "txtCustomColor" I know how to use the text box keyDown event as you can see

  1. private void txtCustomColo_KeyDown(object sender, KeyEventArgs e)
  2. {
  3. if (e.KeyCode == Keys.Enter)
  4. {
  5. panelCustom.BackColor = Color.(txtCustomColo.Text);
  6. }
  7. }

As you are fully aware this event need to press the Enter btn on the keyboard. Now my question is how I can handle the event after updating the text box and Mouse clicking out of the Textbox (Could be any where but txtCustomColor even on windows taskbar)

Best Regards,


Answers (3)