Ruttensoft
asked on
lots of "handles x, y, z...." => Question
Hello
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.KeyEv entArgs) Handles Button14.KeyDown, Button15.KeyDown, Button16.KeyDown
If e.KeyCode > 48 And e.KeyCode < 58 Then
Button14.Text = e.KeyCode - 48
End If
End Sub
But in this example I have 3 buttons "handled", but how can I read in the code which button is "active"?
Thanks!
Sven
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.KeyEv
If e.KeyCode > 48 And e.KeyCode < 58 Then
Button14.Text = e.KeyCode - 48
End If
End Sub
But in this example I have 3 buttons "handled", but how can I read in the code which button is "active"?
Thanks!
Sven
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.