Dear all,
Can anyone help me?
Thanks
Dear all,
Can anyone help me?
Thanks
Here's one way. I'm sure there are others.
'put these declarations at the top of the module
Private Declare 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
Robin Hammond
www.enhanceddatasystems.com
"abc" <abc@abc.com> wrote in message
news:%23NroIZv9FHA.2816@tk2msftngp13.phx.gbl...
> Dear all,
>
> Can anyone help me?
>
> Thanks
>
>
It works! Thank you so much ^^
"Robin Hammond" <rjNOrhSPAM@PLEASEnetvigator.com> ¦b¶l¥ó
news:uU54BEw9FHA.3952@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
> Here's one way. I'm sure there are others.
>
> 'put these declarations at the top of the module
> Private Declare 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
>
> Robin Hammond
> www.enhanceddatasystems.com
>
> "abc" <abc@abc.com> wrote in message
> news:%23NroIZv9FHA.2816@tk2msftngp13.phx.gbl...
> > Dear all,
> >
> > Can anyone help me?
> >
> > Thanks
> >
> >
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks