I don't know of an API to disable the keyboard. However, you may be able to
intercept keyboard entries and then ignore them. What are you trying to
accomplish?
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As
Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Sub BlockIt(lPeriod As Long)
'Blocks keyboard and mouse input events from reaching applications.
DoEvents 'Complete any pending operations first.
BlockInput True 'Block mouse and keyboard input.
Sleep lPeriod 'Wait <lPeriod>/1000 seconds before unblocking it.
BlockInput False 'Unblock the mouse and keyboard input.
End Sub
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.