c4medable
Messages postés3Date d'inscriptionjeudi 4 juillet 2002StatutMembreDernière intervention 5 juillet 2002
-
5 juil. 2002 à 10:42
ezekiel95
Messages postés42Date d'inscriptionmercredi 27 novembre 2002StatutMembreDernière intervention20 mai 2005
-
15 janv. 2004 à 10:17
Je cherche à remplacer le point par la virgule lorsqu'on appuie sur la touche vbKeyDecimal et ce dans toute mon application.
J'utilise la fonction :
SetWindowsHookEx(WH_KEYBOARD, AddressOf KeyboardProc, App.hInstance, App.ThreadID)
avec la fonction :
Public Function KeyboardProc(ByVal idHook As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If (idHook >= 0) Then
If (wParam = vbKeyDecimal) Then
KeyboardProc = 1
SendKeys ","
Exit Function
End If
End If
KeyboardProc = CallNextHookEx(hHook, idHook, wParam, ByVal lParam)
End Function
Mais le problème c'est que le point est remplacé par deux virgule. L'évènement se déclanche plusieurs fois (je suppose keyup et keydown).
Comment puis-je le filtrer pour n'avoir qu'une virgule ?