Khoá bàn phím với Visual Basic

Hàm BlockInput sẽ khóa bàn phím:
Code:

Public Declare Function BlockInput Lib “user32” (ByVal fBlock As Long) As Long                      

Public Function DoActions(x As String)
     Dim Action
     Select Case x
               Case “block”
               Action = BlockInput(True)
     End Select
End Function