Public TonPassword As String Private Sub TextPassWord_KeyPress(KeyAscii As Integer) TonPassword = TonPassword & Chr(KeyAscii) KeyAscii = 42 End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionTextPassword.Inputmask = "*"j'ai beau tapé plusieurs caractères il ne laisse toujours qu'1 seule *... :-(
Private Sub TextPassWord_KeyPress(KeyAscii As Integer) Dim LongueurPass As Integer 'if pour autres touches à rajouter (backspace...) 'textbox invisible contenant le mdp : TextPassword2.SetFocus TextPassword2.Text = TextPassword2.Text & Chr(KeyAscii) 'textbox visible affichant le pass en " *** " LongueurPass = Len(TextPassword2.Text) TextPassword.SetFocus TextPassword.Text = "" For i = 1 To LongueurPass TextPassword.Text = TextPassword.Text & "*" Next i End Sub
Private Sub TextPassWord_KeyPress(KeyAscii As Integer) Dim LongueurPass As Integer TonPassword = TonPassword & Chr(KeyAscii) LongueurPass = Len(TonPassword) TextPassword.Text = "" For i = 1 To LongueurPass TextPassword.Text = TextPassword.Text & "*" Next i End Sub
Public TonPassword As String Private Sub TextPassWord_KeyPress(KeyAscii As Integer) TonPassword = TonPassword & Chr(KeyAscii) KeyAscii = 42 End Sub
Inherits System.Windows.Forms.Form
Public Class Form1 Inherits System.Windows.Forms.Form 'Ceci est une Déclaration des variables globales Public TonPassword As String Private Sub TextBox1_KeyPress(ByVal KeyAscii As System.Object, ByVal e As Integer) TonPassword = TonPassword & Chr(KeyAscii) KeyAscii = 42 End Sub End Class