Form Key Press Event



protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
    if (keyData == Keys.Control)
    {
        MessageBox.Show("The A key was pressed");
        return true;
    }
    return base.ProcessCmdKey(ref msg, keyData);
}

No comments: