Here is a link to a Microsoft page that shows, this, which I have copied below. This is an excellent example of code you can use from the Web. It is useless to try to drop this into your program, but it shows the technique you need to capture keystrokes no matter which form control has the focus. You need to set the proper event in the Form's events to point to this function.

// Detect all numeric characters at the form level and consume 1,
// 4, and 7. Note that Form.KeyPreview must be set to true for this
// event handler to be called.
void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar >= 48 && e.KeyChar <= 57)
{
MessageBox.Show("Form.KeyPress: '" +
e.KeyChar.ToString() + "' pressed.");

switch (e.KeyChar)
{
case (char)49:
case (char)52:
case (char)55:
MessageBox.Show("Form.KeyPress: '" e.KeyChar.ToString() + "' consumed.");
e.Handled = true;
break;
}
}
}