Soldato
- Joined
- 12 Apr 2004
- Posts
- 11,788
- Location
- Somewhere
Is there any way of making use of hotkeys without making Win32 API calls? I've tried using the following:
...but this only works when the form itself has focus, which it doesn't when there are controls on it.
Is there a simple way around this?
Code:
private void MainForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.R && e.Modifiers == (Keys.Shift | Keys.Control))
{
MessageBox.Show("Hotkey pressed!");
}
}
Is there a simple way around this?