C'est vrai, en vb.net c différent, essaie ça, je l'ai adapté d'un bout de code que j'ai retrouvé dans mes cartons mais je n'ai pas testé, je n'ai pas vb.net chez moi :
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim pos As Integer
Dim c as string
pos = TextBox1.SelectionStart 'position du curseur
c=e.keychar 'mémo du caractère tapé
e.Handled = True ' on ignore la frappe
If pos = 0 then
TextBox1.Text = TextBox1.Text.Insert(pos, ucase(c))
else
TextBox1.Text = TextBox1.Text.Insert(pos, lcase(c))
end if
TextBox1.SelectionStart = pos + 1 ' nouvelle position curseur
End Sub
Loup Gris