- 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
-
- Const GWL_STYLE = (-16)
- ' Restricts input to the edit control to digits only
- Const ES_NUMBER = &H2000
-
- ' et dans le form load
- 'Restrict Min, Max and Value fields to numbers only
- SetWindowLong txtValue.hwnd, GWL_STYLE, GetWindowLong(txtValue.hwnd, GWL_STYLE) Or ES_NUMBER
-
-
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
Const GWL_STYLE = (-16)
' Restricts input to the edit control to digits only
Const ES_NUMBER = &H2000
' et dans le form load
'Restrict Min, Max and Value fields to numbers only
SetWindowLong txtValue.hwnd, GWL_STYLE, GetWindowLong(txtValue.hwnd, GWL_STYLE) Or ES_NUMBER