If you wan't to know the state of a single bit, you must use the example I gave you
VB Code:
Public Const KF_TRANSITION_UP As Long = &H80000000 If (lParam And KF_TRANSITION_UP) = KF_TRANSITION_UP Then 'User is releasing the key (key going UP) End If
If you don't know the value of a const, you can caculate it. It goes like this:
Bit 1 -> const = 1
Bit 2 -> const = 2
Bit 3 -> const = 4
Bit 4 -> const = 8
Bit 5 -> const = 16
Bit 6 -> const = 32
and so on...
Bit x -> const = 2 power x (2^x).
If you wan't get the repeat count, this should do it:
VB Code:
Count = LowWord(lParam) Function LoWord(ByVal Num As Long) As Integer If Num And &H8000& Then LoWord = Num Or &HFFFF0000 Else LoWord = Num And &HFFFF& End If End Function




Reply With Quote