private Sub Button19_Click(*****) Handles Button19.Click Action19() End Sub Private Sub Button_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyValue = Keys.Back Then Action19() End Sub private sub Action19() If afficheur.Text.Length = 0 Then afficheur.Text = afficheur.Text Else afficheur.Text = afficheur.Text.Substring(0, afficheur.Text.Length - 1) End If end sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Button_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyValue = Keys.NumPad1 Then Vcode.action1() ' public sub que j'ai mis dans une nouvelle class If e.KeyValue = Keys.NumPad2 Then Vcode.action2() If e.KeyValue = Keys.NumPad3 Then Vcode.action3() If e.KeyValue = Keys.NumPad4 Then Vcode.action4()