Private Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Const kCapital = 20
Private Const kNumlock = 144
Public Function CapsLock() As Boolean
CapsLock = KeyState(kCapital)
End Function
Public Function NumLock() As Boolean
NumLock = KeyState(kNumlock)
End Function
Private Function KeyState(lKey As Long) As Boolean
KeyState = CBool(GetKeyState(lKey))
End Function
Sub pokus()
MsgBox "CL : " & CapsLock & vbNewLine & _
"NL : " & NumLock
End Sub
EDIT: Jaj aha, Vy to chcete nastaviť, nielen prečítať...citovat