Esc is working but alt is not working. pls help
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Escape)
{
MessageBox.Show("sorry you cannot close this form via Esc!!!");
return true;
}
else if (keyData == Keys.Alt)
{
MessageBox.Show("sorry you cannot close this form via Esc!!!");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}