Bonjour,
En VB6 je faisai ça :
Je ne trouve pas comment faire pour vider le tempon clavier "KeyAscii = 0" en VB.NET
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Private Sub txtcoup_KeyPress(Index As Integer, Keyascii As Integer) If Chr(Keyascii) = Chr(43) Then Keyascii = 0 txtCoup(Index).Text = "10" SendKeys "{TAB}" End If End Sub
Ën VB.NET je fais ça :
Mais le résultat dans le TextBox est "+10"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 If AscW(e.KeyChar) = 43 Then txtCp1.Text = "10" SendKeys.Send("{TAB}") End If
Merci d'avance
Fikou
Partager