Skip to content

Instantly share code, notes, and snippets.

@AungWinnHtut
Created June 22, 2016 15:28
Show Gist options
  • Save AungWinnHtut/1364edc8847dbe7528a0ec5af39447ae to your computer and use it in GitHub Desktop.
Save AungWinnHtut/1364edc8847dbe7528a0ec5af39447ae to your computer and use it in GitHub Desktop.
Shortcut Key creation in C#
// Shortcut Key creation
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.Control | Keys.T))
{
MessageBox.Show("What the Ctrl+T?");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment