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