pioug43
Messages postés32Date d'inscriptionlundi 23 décembre 2002StatutMembreDernière intervention 3 novembre 2006
-
24 mars 2003 à 09:24
albator7k
Messages postés9Date d'inscriptionlundi 24 mars 2003StatutMembreDernière intervention27 mars 2003
-
24 mars 2003 à 10:02
Je voudrais connaitre la propriete ou la maniere de faire pour que l'utilisateur ne puisse rentrer que des chiffres dans une text box. Merci
fredlynx
Messages postés662Date d'inscriptionmercredi 16 janvier 2002StatutModérateurDernière intervention16 octobre 20103 24 mars 2003 à 09:32
Version code :
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then Exit Sub 'Backspace
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End Sub
Version API :
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long