[VB6] Touche de tabulation
Hello,
J'ai écris ce code, mais la touche de tabulation ne donne pas son caractère
ASCII 9 comme indiqué dans l'aide.
Quelqu'un pourrai m'aider sur ce point.
Voici le code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| Private Sub txtHoraire_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = vbTab Then
If Len(txtHoraire(Index).Text) < 4 Then
MsgBox LoadResString(L + 881), _
vbOKOnly, LoadResString(L + 1)
txtHoraire(Index).SetFocus
'selectionne le premier caractère
txtHoraire(Index).SelStart = 0
'étend la selection jusqu'au dernier caractaire
txtHoraire(Index).SelLength = Len(txtHoraire(Index).Text)
End If
End If
End Sub |
[Balise [code] rajouté par DrQ]