Per Microsoft, I cannot get or set the KeyChar value for the TAB key.If the TAB or ENTER key is pressed then I need to call a method. Is there a way of either detecting the TAB key or turning it off? I do not want to write a method for each control.leave.
private void tabControl_ProcA_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Tab || e.KeyChar == (char)Keys.Enter)
{
e.Handled = true;
calculateArea(this.ActiveControl);
this.SelectNextControl(this.ActiveControl, true, true, true, false);
}
}
Thanks, cj