Hi all,
is there a way to listen for keydown events on all controls at the same time? I am capturing a barcode scanner's input and the scanner is hooked to a pc. On barcode lock, it simply pastes the number. This means that whatever control currently has the focus, gets also the number.

VB Code:
  1. Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
  2.  
  3.         'MessageBox.Show(e.KeyValue.ToString) helped me to get the keycode
  4.         txtBarcode.Focus()
  5.  
  6.     End Sub
This works but only if the form itself has the focus. Do I have to check the keydown event of every control or is there an event that fires each time, regardless of where the focus is.

I guess I could use ZaNi's idea but would it be at all sane with 50+ controls?