Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question.SelectionStart = selectionDebut .SelectionLength = selectionLongueur
Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBoxFTFBnLigneIgnorFin.Validated MajusculeAuDebut(sender) End Sub Private Sub MajusculeAuDebut(ByVal monTextBox As TextBox) With monTextBox If .Text.Length = 1 Then .Text = .Text.Substring(0, 1).ToUpper ElseIf .Text.Length > 1 Then .Text = .Text.Substring(0, 1).ToUpper & .Text 'Pourquoi ".Text.Substring(1).ToLower" ? il faut aussi supprimer les éventuelles majuscules des autres lettres ??? End If End With End Sub
Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBoxFTFBnLigneIgnorFin.Validated MajusculeAuDebut(sender) End Sub Private Sub MajusculeAuDebut(ByVal monTextBox As TextBox) With monTextBox If .Text.Length = 1 Then .Text = .Text.Substring(0, 1).ToUpper ElseIf .Text.Length > 1 Then .Text = .Text.Substring(0, 1).ToUpper & .Text.Substring(1) 'Pourquoi ".ToLower" ? il faut aussi supprimer les éventuelles majuscules des autres lettres ??? End If End With End Sub