You can do something like below :
List<char> lstdisableChar = new List<char>();
private void CheckBox_CheckedChanged(object sender, EventArgs e)
{
CheckBox chkTmp = sender as CheckBox;
if (chkTmp.Name == checkBox1.Name)
{
if (chkTmp.Checked)
lstdisableChar.Add('A');
else
lstdisableChar.Remove('A');
}
else if (chkTmp.Name == checkBox2.Name)
{
if (chkTmp.Checked)
lstdisableChar.Add('a');
else
lstdisableChar.Remove('a');
}
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = lstdisableChar.Contains(e.KeyChar);
}