lots of "handles x, y, z...." => Question
Posted on 2006-06-21
I have lots of buttons, and if I click on one, and I then press a key (1-9), the name of the button should change to the key-value.
I can do it like this:
Private Sub Button14_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button14.KeyDown, Button15.KeyDown, Button16.KeyDown
If e.KeyCode > 48 And e.KeyCode < 58 Then
Button14.Text = e.KeyCode - 48
But in this example I have 3 buttons "handled", but how can I read in the code which button is "active"?